zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
U
\±dA
ã@sddlmZGdd„dƒZdS)é)ÚCommandc@s‚eZdZGdd„dƒZedƒZedƒZedƒZedƒZdd„Ze    d    d
„ƒZ
d d „Z e    d d„ƒZ e j ddœdd„ƒZ e    dd„ƒZdS)ÚMobilec@s8eZdZdd„Zedd„ƒZedd„ƒZedd„ƒZd    S)
zMobile.ConnectionTypecCs
||_dS)N©Úmask)Úselfr©rúWd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/remote/mobile.pyÚ__init__szMobile.ConnectionType.__init__cCs|jddkS©Nérr©rrrrÚ airplane_modesz#Mobile.ConnectionType.airplane_modecCs|jdddkSr
rr rrrÚwifiszMobile.ConnectionType.wificCs|jddkS)Néérr rrrÚdata"szMobile.ConnectionType.dataN)Ú__name__Ú
__module__Ú __qualname__r    Úpropertyr rrrrrrÚConnectionTypes
 
rér rrcCsddl}| |¡|_dS)Nr)ÚweakrefÚproxyÚ_driver)rZdriverrrrrr    +szMobile.__init__cCs| |j tj¡d¡S)NÚvalue)rrÚexecuterZGET_NETWORK_CONNECTIONr rrrÚnetwork_connection0szMobile.network_connectioncCs:t||jƒr|jn|}| |j tjdd|idœ¡d¡S)zµSet the network connection for the remote device.
 
        Example of setting airplane mode::
 
            driver.mobile.set_network_connection(driver.mobile.AIRPLANE_MODE)
        rÚtype)ÚnameÚ
parametersr)Ú
isinstancerrrrrZSET_NETWORK_CONNECTION)rÚnetworkÚmoderrrÚset_network_connection4s ÿþÿzMobile.set_network_connectioncCs|j tj¡S)z0returns the current context (Native or WebView).)rrrZCURRENT_CONTEXT_HANDLEr rrrÚcontextBszMobile.contextN)ÚreturncCs|j tjd|i¡dS)zsets the current context.rN)rrrZSWITCH_TO_CONTEXT)rZ new_contextrrrr%GscCs|j tj¡S)z%returns a list of available contexts.)rrrZCONTEXT_HANDLESr rrrÚcontextsLszMobile.contexts)rrrrZ ALL_NETWORKZ WIFI_NETWORKZ DATA_NETWORKZ AIRPLANE_MODEr    rrr$r%Úsetterr'rrrrrs
 
rN)ÚcommandrrrrrrÚ<module>s