
    EgA
                     ,    d dl mZ  G d d          ZdS )   )Commandc                       e Zd Z G d d          Z ed          Z ed          Z ed          Z ed          Zd Ze	d             Z
d	 Ze	d
             Zej        dd            Ze	d             ZdS )Mobilec                   V    e Zd Zd Zed             Zed             Zed             ZdS )Mobile.ConnectionTypec                     || _         d S )Nmask)selfr
   s     U/var/www/sysmax/venv/lib/python3.11/site-packages/selenium/webdriver/remote/mobile.py__init__zMobile.ConnectionType.__init__   s    DIII    c                     | j         dz  dk    S N   r   r	   r   s    r   airplane_modez#Mobile.ConnectionType.airplane_mode   s    9q=A%%r   c                 $    | j         dz  dz  dk    S r   r	   r   s    r   wifizMobile.ConnectionType.wifi   s    IMQ&!++r   c                     | j         dz  dk    S )N       r	   r   s    r   datazMobile.ConnectionType.data"   s    IMQ&&r   N)__name__
__module____qualname__r   propertyr   r   r    r   r   ConnectionTyper      st        	 	 	 
	& 	& 
	& 
	, 	, 
	, 
	' 	' 
	' 	' 	'r   r      r   r   r   c                 B    dd l }|                    |          | _        d S )Nr   )weakrefproxy_driver)r   driverr"   s      r   r   zMobile.__init__+   s"    }}V,,r   c                 |    |                      | j                            t          j                  d                   S )Nvalue)r   r$   executer   GET_NETWORK_CONNECTIONr   s    r   network_connectionzMobile.network_connection0   s/    ""4<#7#78V#W#WX_#`aaar   c                     t          || j                  r|j        n|}|                     | j                            t
          j        dd|id          d                   S )zSet 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'   )
isinstancer   r
   r$   r(   r   SET_NETWORK_CONNECTION)r   networkmodes      r   set_network_connectionzMobile.set_network_connection4   sn      *'43FGGTw||W""L  .9M^dfj]k0l0l 
 
 	
r   c                 J    | j                             t          j                  S )z0returns the current context (Native or WebView).)r$   r(   r   CURRENT_CONTEXT_HANDLEr   s    r   contextzMobile.contextB   s     |##G$BCCCr   returnNc                 T    | j                             t          j        d|i           dS )zsets the current context.r-   N)r$   r(   r   SWITCH_TO_CONTEXT)r   new_contexts     r   r6   zMobile.contextG   s*     	W68MNNNNNr   c                 J    | j                             t          j                  S )z%returns a list of available contexts.)r$   r(   r   CONTEXT_HANDLESr   s    r   contextszMobile.contextsL   s     |##G$;<<<r   )r7   N)r   r   r   r   ALL_NETWORKWIFI_NETWORKDATA_NETWORKAIRPLANE_MODEr   r   r*   r3   r6   setterr=   r   r   r   r   r      s       ' ' ' ' ' ' ' '  !.##K!>!$$L!>!$$L"N1%%M- - -
 b b Xb
 
 
 D D XD ^O O O ^O = = X= = =r   r   N)commandr   r   r   r   r   <module>rD      sK   $      := := := := := := := := := :=r   