
     f8
                     F    d dl mZ  G d d          Z G d d          ZdS )   )Commandc                   V    e Zd Zd Zed             Zed             Zed             ZdS )_ConnectionTypec                     || _         d S )Nmask)selfr   s     c/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/remote/mobile.py__init__z_ConnectionType.__init__   s    			    c                     | j         dz  dk    S N   r   r   r	   s    r
   airplane_modez_ConnectionType.airplane_mode   s    y1}!!r   c                 $    | j         dz  dz  dk    S r   r   r   s    r
   wifiz_ConnectionType.wifi   s    	A"a''r   c                     | j         dz  dk    S )N       r   r   s    r
   dataz_ConnectionType.data!   s    	A""r   N)__name__
__module____qualname__r   propertyr   r   r    r   r
   r   r      st           " " X" ( ( X( # # X# # #r   r   c                       e Zd Ze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 )Mobile   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)ConnectionTyper#   executer   GET_NETWORK_CONNECTIONr   s    r
   network_connectionzMobile.network_connection2   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_connection6   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.contextD   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.contextI   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.contextsN   s     |##G$;<<<r   )r7   N)r   r   r   r   r'   ALL_NETWORKWIFI_NETWORKDATA_NETWORKAIRPLANE_MODEr   r   r*   r3   r6   setterr=   r   r   r
   r   r   &   s        $N .##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   r
   <module>rD      ss   $      # # # # # # # #"+= += += += += += += += += +=r   