
    ^j	                     R    d dl mZmZmZ d dlmZ d dlmZ ddlm	Z
  G d de      Zy)	    )DictListUnion)Self)CanExecuteCommands   )MobileCommandc            	       ^    e Zd Zd	deee   df   deeeeef   f   fdZdedede	fdZ
d
dZy)LogEventNtypereturnc                 Z    i }|||d<   | j                  t        j                  |      d   S )a  Retrieves events information from the current session
        (Since Appium 1.16.0)

        Args:
            type: The event type to filter with

        Usage:
            | events = driver.get_events()
            | events = driver.get_events(['appium:funEvent'])

        Returns:
            `dict`: A dictionary of events timing information containing the following entries
                | commands: (`list` of `dict`) List of dictionaries containing the following entries
                | cmd: The command name that has been sent to the appium server
                | startTime: Received time
                | endTime: Response time
        r   value)executeCommand
GET_EVENTS)selfr   datas      Y/home/ubuntu/.local/lib/python3.12/site-packages/appium/webdriver/extensions/log_event.py
get_eventszLogEvent.get_events   s4    $ DL||G..5g>>    vendoreventc                 P    ||d}| j                  t        j                  |       | S )a7  Log a custom event on the Appium server.
        (Since Appium 1.16.0)

        Args:
            vendor: The vendor to log
            event: The event to log

        Usage:
            driver.log_event('appium', 'funEvent')

        Returns:
            Union['WebDriver', 'LogEvent']: Self instance
        )r   r   )r   r   	LOG_EVENT)r   r   r   r   s       r   	log_eventzLogEvent.log_event0   s'     !51W&&-r   c                     | j                   j                  t        j                  dd       | j                   j                  t        j                  dd       y )NPOSTz!/session/$sessionId/appium/eventsz$/session/$sessionId/appium/log_event)command_executoradd_commandr   r   r   )r   s    r   _add_commandszLogEvent._add_commandsB   s@    ))'*<*<fFij))'*;*;VEklr   )N)r   N)__name__
__module____qualname__r   r   strr   intr   r   r   r!    r   r   r   r      sW    ?uT#Y_5 ?c5QTVYQY?FZA[ ?. C D $mr   r   N)typingr   r   r   typing_extensionsr   /appium.protocols.webdriver.can_execute_commandsr   mobilecommandr	   r   r   r'   r   r   <module>r,      s%    % $ " N 4,m! ,mr   