1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
U
\±d4ã@snddlZddlZddlmZddlmZddlmZddlmZddl    m
Z
Gdd„dƒZ Gd    d
„d
eƒZ dS) éN)ÚUnion)ÚDesiredCapabilities)Ú
ArgOptions)Ú FirefoxBinary)ÚFirefoxProfilec@s(eZdZddœdd„Zedœdd„ZdS)ÚLogN©ÚreturncCs
d|_dS©N©Úlevel©Úself©rúYd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/firefox/options.pyÚ__init__sz Log.__init__cCs|jrdd|jiiSiS)NÚlogr r r rrrÚto_capabilitiesszLog.to_capabilities)Ú__name__Ú
__module__Ú __qualname__rÚdictrrrrrrsrcs6eZdZdZddœ‡fdd„ Zeedœdd„ƒZeje    e
efddœd    d„ƒZee
dœd
d „ƒZ e je
dd œd d „ƒZ ee dœdd„ƒZ e
e    e
eefdœdd„Zeedœdd„ƒZeje    e
efddœdd„ƒZeedœdd„ƒZejedd œdd„ƒZd"e
dœ‡fdd„ Ze dœdd„Zee dœd d!„ƒZ‡ZS)#ÚOptionszmoz:firefoxOptionsNrcs.tƒ ¡d|_i|_d|_d|_tƒ|_dSr
)ÚsuperrÚ_binaryÚ _preferencesÚ_profileÚ_proxyrrr ©Ú    __class__rrr(s 
zOptions.__init__cCs|jS)z#Returns the FirefoxBinary instance.)rr rrrÚbinary0szOptions.binary)Ú
new_binaryr    cCst|tƒst|ƒ}||_dS)z\Sets location of the browser binary, either by string or
        ``FirefoxBinary`` instance.N)Ú
isinstancerr)rr!rrrr 5s
cCs|jjS)z7
        :Returns: The location of the binary.
        )r Ú
_start_cmdr rrrÚbinary_location=szOptions.binary_location)Úvaluer    cCs
||_dS)z2Sets the location of the browser binary by string.N)r ©rr%rrrr$DscCs|jS)z :Returns: A dict of preferences.©rr rrrÚ preferencesIszOptions.preferences)Únamer%cCs||j|<dS)zSets a preference.Nr')rr)r%rrrÚset_preferenceNszOptions.set_preferencecCs|jrtjdtdd|jS)z7
        :Returns: The Firefox profile to use.
        z&Getting a profile has been deprecated.é©Ú
stacklevel)rÚwarningsÚwarnÚDeprecationWarningr rrrÚprofileRszOptions.profile)Ú new_profiler    cCs,tjdtddt|tƒs"t|ƒ}||_dS)z\Sets location of the browser profile to use, either by string or
        ``FirefoxProfile``.z_Setting a profile has been deprecated. Please use the set_preference and install_addons methodsr+r,N)r.r/r0r"rr)rr2rrrr1[sý
cCstjdtddd|jkS)zL
        :Returns: True if the headless argument is set, else False
        zKheadless property is deprecated, instead check for '-headless' in argumentsr+r,ú    -headless)r.r/r0Ú
_argumentsr rrrÚheadlesshs ýzOptions.headlesscCs<tjdtdd|r"|j d¡nd|jkr8|j d¡dS)zxSets the headless argument.
 
        Args:
          value: boolean value indicating to set the headless option
        zFheadless property is deprecated, instead use add_argument('-headless')r+r,r3N)r.r/r0r4ÚappendÚremover&rrrr5tsÿ
úorg.mozilla.firefox)Úandroid_packagecstƒ |||¡dSr
)rÚ enable_mobile)rr9Zandroid_activityZ device_serialrrrr:ƒszOptions.enable_mobilecCs”|j}i}|jr|jj|d<|jr,|j|d<|jr>|j |¡|jrP|jj|d<|jr`|j|d<|j    rr| 
|j    ¡| 
|j   ¡¡|r||t j<|S)z>Marshals the Firefox options to a `moz:firefoxOptions` object.r Zprefsr1Úargs)Z_capsrr#rrZadd_to_capabilitiesrÚencodedr4Zmobile_optionsÚupdaterrrÚKEY)rZcapsÚoptsrrrr†s$ 
 
 
zOptions.to_capabilitiescCs
tj ¡Sr
)rZFIREFOXÚcopyr rrrÚdefault_capabilities£szOptions.default_capabilities)r8NN)rrrr>rÚpropertyrr ÚsetterrÚstrr$rr(ÚintÚboolr*rr1r5r:rrAÚ __classcell__rrrrr%s2  r) Útypingr.rZ.selenium.webdriver.common.desired_capabilitiesrZ!selenium.webdriver.common.optionsrZ)selenium.webdriver.firefox.firefox_binaryrZ*selenium.webdriver.firefox.firefox_profilerrrrrrrÚ<module>s