Ë
    cQbjî  ã                   ó^   — d dl mZ d dlmZ d dlmZ d dlmZ  G d„ d«      Z G d„ de«      Z	y	)
é    )ÚAny)ÚDesiredCapabilities)Ú
ArgOptions)ÚFirefoxProfilec                   ó    — e Zd Zdd„Zdefd„Zy)ÚLogÚreturnNc                 ó   — d | _         y ©N©Úlevel©Úselfs    úU/var/www/html/venv/lib/python3.12/site-packages/selenium/webdriver/firefox/options.pyÚ__init__zLog.__init__   s	   € Øˆ�
ó    c                 ó>   — | j                   rdd| j                   iiS i S )NÚlogr   r   r   s    r   Úto_capabilitieszLog.to_capabilities   s"   € Ø�:Š:Ø˜G T§Z¡ZÐ0Ð1Ð1Øˆ	r   ©r	   N)Ú__name__Ú
__module__Ú__qualname__r   Údictr   © r   r   r   r      s   „ óð ô r   r   c                   ó&  ‡ — e Zd ZdZdˆ fd„Zedefd„«       Zej                  deddfd„«       Zede	fd„«       Z
d	edeez  ez  fd
„Zededz  fd„«       Zej                  deez  ddfd„«       Z	 ddedz  fˆ fd„Zde	fd„Zede	fd„«       Zˆ xZS )ÚOptionszmoz:firefoxOptionsr	   Nc                 óˆ   •— t         ‰| �  «        d| _        i | _        d| j                  d<   d | _        t        «       | _        y )NÚ é   zremote.active-protocols)Úsuperr   Ú_binary_locationÚ_preferencesÚ_profiler   r   )r   Ú	__class__s    €r   r   zOptions.__init__&   sA   ø€ Ü‰ÑÔØ "ˆÔØ"$ˆÔð 89ˆ×ÑÐ3Ñ4Ø/3ˆŒÜ“5ˆ�r   c                 ó   — | j                   S )z#Returns the location of the binary.)r"   r   s    r   Úbinary_locationzOptions.binary_location0   s   € ð ×$Ñ$Ð$r   Úvaluec                 ó\   — t        |t        «      st        | j                  «      ‚|| _        y)z2Sets the location of the browser binary by string.N)Ú
isinstanceÚstrÚ	TypeErrorÚBINARY_LOCATION_ERRORr"   )r   r(   s     r   r'   zOptions.binary_location5   s'   € ô ˜%¤Ô%Ü˜D×6Ñ6Ó7Ð7Ø %ˆÕr   c                 ó   — | j                   S )zReturns a dict of preferences.©r#   r   s    r   ÚpreferenceszOptions.preferences<   s   € ð × Ñ Ð r   Únamec                 ó"   — || j                   |<   y)zSets a preference.Nr/   )r   r1   r(   s      r   Úset_preferencezOptions.set_preferenceA   s   € à"'ˆ×Ñ˜$Òr   c                 ó   — | j                   S )z#Returns the Firefox profile to use.)r$   r   s    r   ÚprofilezOptions.profileE   s   € ð �}‰}Ðr   Únew_profilec                 óH   — t        |t        «      st        |«      }|| _        y)zQSet the location of the browser profile to use (string or FirefoxProfile object).N)r*   r   r$   )r   r6   s     r   r5   zOptions.profileJ   s   € ô ˜+¤~Ô6Ü(¨Ó5ˆKØ#ˆ�r   Úandroid_packagec                 ó(   •— t         ‰| �  |||«       y r   )r!   Úenable_mobile)r   r8   Úandroid_activityÚdevice_serialr%   s       €r   r:   zOptions.enable_mobileQ   s   ø€ ô 	‰Ñ˜oÐ/?ÀÕOr   c                 óØ  — | j                   }i }| j                  r| j                  |d<   | j                  r| j                  |d<   | j                  r| j                  j                  |d<   | j
                  r| j
                  |d<   | j                  r|j                  | j                  «       |j                  | j                  j                  «       «       |r||t        j                  <   |S )z>Marshals the Firefox options to a `moz:firefoxOptions` object.ÚbinaryÚprefsr5   Úargs)Ú_capsr"   r#   r$   ÚencodedÚ
_argumentsÚmobile_optionsÚupdater   r   r   ÚKEY)r   ÚcapsÚoptss      r   r   zOptions.to_capabilitiesV   sº   € ð �z‰zˆØ!ˆà× Ò Ø!×2Ñ2ˆD�‰NØ×ÒØ ×-Ñ-ˆD�‰MØ�=Š=Ø"Ÿm™m×3Ñ3ˆD�‰OØ�?Š?ØŸ?™?ˆD�‰LØ×ÒØ�K‰K˜×+Ñ+Ô,à�‰�D—H‘H×,Ñ,Ó.Ô/áØ $ˆD”—‘Ñàˆr   c                 ó>   — t         j                  j                  «       S r   )r   ÚFIREFOXÚcopyr   s    r   Údefault_capabilitieszOptions.default_capabilitiesq   s   € ä"×*Ñ*×/Ñ/Ó1Ð1r   r   )zorg.mozilla.firefoxNN)r   r   r   rF   r   Úpropertyr+   r'   Úsetterr   r0   ÚintÚboolr3   r   r5   r:   r   rL   Ú__classcell__)r%   s   @r   r   r   #   s  ø„ Ø
€Cõð ð% ò %ó ð%ð ×Ñð& Sð &¨Tò &ó ð&ð ð!˜Tò !ó ð!ð( 3ð (¨s°S©y¸4Ñ/?ó (ð ð˜¨$Ñ.ò ó ðð ‡^�^ð$ 3¨Ñ#7ð $¸Dò $ó ð$ð imñPØ" T™zõPð
 ó ð6 ð2 dò 2ó ô2r   r   N)
Útypingr   Ú.selenium.webdriver.common.desired_capabilitiesr   Ú!selenium.webdriver.common.optionsr   Ú*selenium.webdriver.firefox.firefox_profiler   r   r   r   r   r   ú<module>rV      s+   ðõ$ å NÝ 8Ý E÷ñ ôP2ˆjõ P2r   