
    ^j                     >    d dl mZ d dlmZ ddlmZ  G d de      Zy)    )List)CanExecuteCommands   )MobileCommandc                   \    e Zd Zedee   fd       Zedefd       Zedefd       ZddZ	y)Contextreturnc                 F    | j                  t        j                        d   S )zReturns the contexts within the current session.

        Usage:
            driver.contexts

        Return:
            :obj:`list` of :obj:`str`: The contexts within the current session

        value)executeCommandCONTEXTSselfs    W/home/ubuntu/.local/lib/python3.12/site-packages/appium/webdriver/extensions/context.pycontextszContext.contexts   s     ||G,,-g66    c                 F    | j                  t        j                        d   S )zReturns the current context of the current session.

        Usage:
            driver.current_context

        Return:
            str: The context of the current session
        r   )r   r   GET_CURRENT_CONTEXTr   s    r   current_contextzContext.current_context$   s     ||G778AAr   c                     | j                   S )zReturns the current context of the current session.

        Usage:
            driver.context

        Return:
            str: The context of the current session
        )r   r   s    r   contextzContext.context0   s     ###r   Nc                    | j                   j                  t        j                  dd       | j                   j                  t        j                  dd       | j                   j                  t        j
                  dd       y )NGETz/session/$sessionId/contextsz/session/$sessionId/contextPOST)command_executoradd_commandr   r   r   SWITCH_TO_CONTEXTr   s    r   _add_commandszContext._add_commands<   s_    ))'*:*:ECab))'*E*EuNkl))'*C*CVMjkr   )r	   N)
__name__
__module____qualname__propertyr   strr   r   r   r    r   r   r   r      s^    
7$s) 
7 
7 	B 	B 	B 	$ 	$ 	$lr   r   N)typingr   /appium.protocols.webdriver.can_execute_commandsr   mobilecommandr   r   r   r%   r   r   <module>r)      s     N 4)l  )lr   