
    ,h8
                     8    d dl mZ  G d d      Z G d d      Zy)   )Commandc                   B    e Zd Zd Zed        Zed        Zed        Zy)_ConnectionTypec                     || _         y )Nmask)selfr   s     b/var/www/html/Resume-Scraper/venv/lib/python3.12/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    yy1}!!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kD  S )N       r   r   s    r
   dataz_ConnectionType.data!   s    		A""r   N)__name__
__module____qualname__r   propertyr   r   r    r   r
   r   r      sC     " " ( ( # #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y	)Mobile   r   r   r   c                 8    dd l }|j                  |      | _        y )Nr   )weakrefproxy_driver)r	   driverr!   s      r
   r   zMobile.__init__-   s    }}V,r   c                 x    | j                  | j                  j                  t        j                        d         S )Nvalue)ConnectionTyper#   executer   GET_NETWORK_CONNECTIONr   s    r
   network_connectionzMobile.network_connection2   s.    ""4<<#7#78V8V#WX_#`aar   c                     t        || j                        r|j                  n|}| j                  | j                  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   sc      *'43F3FGw||W""LL  ..9M^dfj]k0l
 	
r   c                 T    | 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$BCCr   Nc                 \    | j                   j                  t        j                  d|i       y)zSets the current context.r-   N)r#   r(   r   SWITCH_TO_CONTEXT)r	   new_contexts     r
   r6   zMobile.contextI   s#     	W668MNr   c                 T    | 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   )returnN)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"1%M-
 b b
 D D ^^O O = =r   r   N)commandr   r   r   r   r   r
   <module>rD      s   $ # #"+= +=r   