
    ^j                     J    d dl mZ d dlmZ d dlmZ ddlmZ  G d de      Z	y)	    )Dict)logger)CanExecuteCommands   )MobileCommandc                   *    e Zd Zedefd       ZddZy)Sessionreturnc                     	 | j                  t        j                        d   d   S # t        $ r"}t	        j
                  d|       i cY d}~S d}~ww xY w)zRetrieves events information from the current session

        Usage:
            events = driver.events

        Returns:
            `dict`:  containing events timing information from the current session
        valueeventsz;Could not find events information in the session. Error: %sN)executeCommandGET_SESSION	Exceptionr   warning)selfes     W/home/ubuntu/.local/lib/python3.12/site-packages/appium/webdriver/extensions/session.pyr   zSession.events   sK    	<< 3 34W=hGG 	NNXZ[\I	s   $' 	AAAANc                 Z    | j                   j                  t        j                  dd       y )NGETz/session/$sessionId)command_executoradd_commandr   r   )r   s    r   _add_commandszSession._add_commands(   s!    ))'*=*=uF[\    )r
   N)__name__
__module____qualname__propertyr   r   r    r   r   r	   r	      s!      ]r   r	   N)
typingr   appium.common.loggerr   /appium.protocols.webdriver.can_execute_commandsr   mobilecommandr   r   r	   r    r   r   <module>r%      s"     ' N 4]  ]r   