
     f                         d dl mZ erd dl mZ  G d ded          Znd dl mZ eeef         Z G d d	          Z G d
 d          ZdS )    )TYPE_CHECKING)	TypedDictc                   .    e Zd ZU eed<   eed<   eed<   dS )JSONTimeoutsimplicitpageLoadscriptN)__name__
__module____qualname__int__annotations__     e/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/timeouts.pyr   r      s+         r   r   F)total)Dictc                   ,    e Zd ZdZd ZdefdZddZdS )_TimeoutsDescriptorzGet or set the value of the attributes listed below.

    _implicit_wait _page_load _script

    This does not set the value on the remote end.
    c                     || _         d S )N)name)selfr   s     r   __init__z_TimeoutsDescriptor.__init__*   s    			r   returnc                 2    t          || j                  dz  S )N  )getattrr   )r   objclss      r   __get__z_TimeoutsDescriptor.__get__-   s    sDI&&--r   Nc                 d     t          |d          |          }t          || j        |           d S )N_convert)r   setattrr   )r   r   valueconverted_values       r   __set__z_TimeoutsDescriptor.__set__0   s5    2'#z22599TY00000r   )r   N)r
   r   r   __doc__r   floatr    r&   r   r   r   r   r   "   s\           .5 . . . .1 1 1 1 1 1r   r   c            	           e Zd ZddedededdfdZ ed          Z	  ed	          Z	  ed
          Z	 dede	fdZ
defdZdS )Timeoutsr   implicit_wait	page_loadr	   r   Nc                 0    || _         || _        || _        dS )ab  Create a new Timeouts object.

        This implements https://w3c.github.io/webdriver/#timeouts.

        :Args:
         - implicit_wait - Either an int or a float. Set how many
            seconds to wait when searching for elements before
            throwing an error.
         - page_load - Either an int or a float. Set how many seconds
            to wait for a page load to complete before throwing
            an error.
         - script - Either an int or a float. Set how many seconds to
            wait for an asynchronous script to finish execution
            before throwing an error.
        N)r+   r,   r	   )r   r+   r,   r	   s       r   r   zTimeouts.__init__6   s    " +"r   _implicit_wait
_page_load_scripttimeoutc                     t          |t          t          f          rt          t          |          dz            S t          d          )Nr   z&Timeouts can only be an int or a float)
isinstancer   r(   	TypeError)r   r1   s     r   r"   zTimeouts._convert   s@    gU|,, 	.uW~~,---@AAAr   c                 p    i }| j         r
| j         |d<   | j        r
| j        |d<   | j        r
| j        |d<   |S )Nr   r   r	   )r.   r/   r0   )r   timeoutss     r   _to_jsonzTimeouts._to_json   sP    !# 	7#'#6HZ ? 	3#'?HZ < 	.!%HXr   )r   r   r   )r
   r   r   r(   r   r   r+   r,   r	   r   r"   r   r7   r   r   r   r*   r*   5   s         e E u ]a    , ('(899M  $#L11I  ! ++F"B B# B B B B
	, 	 	 	 	 	 	r   r*   N)	typingr   r   r   r   strr   r   r*   r   r   r   <module>r:      s   $ !           "          y      S>L1 1 1 1 1 1 1 1&Y Y Y Y Y Y Y Y Y Yr   