Ë
    $åhiŠ  ã                   óv   — d dl mZ d dlmZ 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)Ú
deprecated)ÚDesiredCapabilities)Ú
ArgOptions)ÚFirefoxBinary)ÚFirefoxProfilec                   ó    — e Zd Zdd„Zdefd„Zy)ÚLogÚreturnNc                 ó   — d | _         y ©N©Úlevel©Úselfs    úNC:\des-py\Monitor\venv\Lib\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 ed«      defd„«       «       Zej                   ed«      de
ez  d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   zuse binary_location insteadc                 ó,   — t        | j                  «      S )z#Returns the FirefoxBinary instance.)r   r$   r   s    r   ÚbinaryzOptions.binary3   s   € ô ˜T×2Ñ2Ó3Ð3r   Ú
new_binaryc                 ó\   — t        |t        «      r|j                  }t        |«      | _        y)zBSet location of browser binary (string or FirefoxBinary instance).N)Ú
isinstancer   Ú
_start_cmdÚstrÚbinary_location)r   r*   s     r   r)   zOptions.binary9   s%   € ô �j¤-Ô0Ø#×.Ñ.ˆJÜ" :›ˆÕr   c                 ó   — | j                   S )z#Returns the location of the binary.)r$   r   s    r   r/   zOptions.binary_locationA   s   € ð ×$Ñ$Ð$r   Úvaluec                 ó\   — t        |t        «      st        | j                  «      ‚|| _        y)z2Sets the location of the browser binary by string.N)r,   r.   Ú	TypeErrorÚBINARY_LOCATION_ERRORr$   )r   r1   s     r   r/   zOptions.binary_locationF   s'   € ô ˜%¤Ô%Ü˜D×6Ñ6Ó7Ð7Ø %ˆÕr   c                 ó   — | j                   S )zReturns a dict of preferences.©r%   r   s    r   ÚpreferenceszOptions.preferencesM   s   € ð × Ñ Ð r   Únamec                 ó"   — || j                   |<   y)zSets a preference.Nr6   )r   r8   r1   s      r   Úset_preferencezOptions.set_preferenceR   s   € à"'ˆ×Ñ˜$Òr   c                 ó   — | j                   S )z#Returns the Firefox profile to use.)r&   r   s    r   ÚprofilezOptions.profileV   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   r=   s     r   r<   zOptions.profile[   s   € ô ˜+¤~Ô6Ü(¨Ó5ˆKØ#ˆ�r   Úandroid_packagec                 ó(   •— t         ‰| �  |||«       y r   )r#   Úenable_mobile)r   r?   Úandroid_activityÚdevice_serialr'   s       €r   rA   zOptions.enable_mobileb   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.r)   Úprefsr<   Úargs)Ú_capsr$   r%   r&   ÚencodedÚ
_argumentsÚmobile_optionsÚupdater   r   r   ÚKEY)r   ÚcapsÚoptss      r   r   zOptions.to_capabilitiesg   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_capabilities‚   s   € ä"×*Ñ*×/Ñ/Ó1Ð1r   r   )zorg.mozilla.firefoxNN)r   r   r   rL   r   Úpropertyr   r   r)   Úsetterr.   r/   r   r7   ÚintÚboolr:   r   r<   rA   r   rR   Ú__classcell__)r'   s   @r   r   r   &   su  ø„ Ø
€Cõð ÙÐ-Ó.ð4˜ò 4ó /ó ð4ð ‡]�]ÙÐ-Ó.ð/  }Ñ!4ð /¸ò /ó /ó ð/ð ð% ò %ó ð%ð ×Ñð& 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   Útyping_extensionsr   Ú.selenium.webdriver.common.desired_capabilitiesr   Ú!selenium.webdriver.common.optionsr   Ú)selenium.webdriver.firefox.firefox_binaryr   Ú*selenium.webdriver.firefox.firefox_profiler   r
   r   r   r   r   ú<module>r^      s1   ðõ$ å (å NÝ 8Ý CÝ E÷ñ ô^2ˆjõ ^2r   