
     f                     n    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 G d de          Zd	S )
   )interaction)InputDevice)Interaction)Pausec                   V     e Zd Zdeddf fdZdefdZddZddZdd	e	ddfd
Z
 xZS )KeyInputnamereturnNc                 x    t                                                       || _        t          j        | _        d S N)super__init__r	   r   KEYtype)selfr	   	__class__s     n/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/actions/key_input.pyr   zKeyInput.__init__   s-    	O			    c                 @    | j         | j        d | j        D             dS )Nc                 6    g | ]}|                                 S  )encode).0actss     r   
<listcomp>z#KeyInput.encode.<locals>.<listcomp>   s!    ?g?g?gRV?g?g?gr   )r   idactions)r   r	   r   r   s    r   r   zKeyInput.encode   s)    	?g?gZ^Zf?g?g?ghhhr   c                 N    |                      t          | d|                     d S )NkeyDown
add_actionTypingInteractionr   keys     r   create_key_downzKeyInput.create_key_down    s'    )$	3??@@@@@r   c                 N    |                      t          | d|                     d S )NkeyUpr!   r$   s     r   create_key_upzKeyInput.create_key_up#   s'    )$==>>>>>r       pause_durationc                 L    |                      t          | |                     d S r   )r"   r   )r   r+   s     r   create_pausezKeyInput.create_pause&   s$    dN3344444r   r
   N)r*   )__name__
__module____qualname__strr   dictr   r&   r)   floatr-   __classcell__r   s   @r   r   r      s        $S $T $ $ $ $ $ $
i i i i iA A A A? ? ? ?5 55 5 5 5 5 5 5 5 5 5r   r   c                   ,     e Zd Zd fdZdefdZ xZS )r#   r
   Nc                 f    t                                          |           || _        || _        d S r   )r   r   r   r%   )r   sourcetype_r%   r   s       r   r   zTypingInteraction.__init__+   s-       	r   c                      | j         | j        dS )N)r   value)r   r%   r   s    r   r   zTypingInteraction.encode0   s    	DH555r   r.   )r/   r0   r1   r   r3   r   r5   r6   s   @r   r#   r#   *   sX             
6 6 6 6 6 6 6 6 6r   r#   N) r   input_devicer   r   r   r   r#   r   r   r   <module>r?      s   "       % % % % % % $ $ $ $ $ $      5 5 5 5 5{ 5 5 5&6 6 6 6 6 6 6 6 6 6r   