
    ,h                     ~    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y)    )TYPE_CHECKING)	TypedDictc                   ,    e Zd ZU eed<   eed<   eed<   y)JSONTimeoutsimplicitpageLoadscriptN)__name__
__module____qualname__int__annotations__     d/var/www/html/Resume-Scraper/venv/lib/python3.12/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y)_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                     || _         y )N)name)selfr   s     r   __init__z_TimeoutsDescriptor.__init__*   s	    	r   returnc                 4    t        || j                        dz  S )N  )getattrr   )r   objclss      r   __get__z_TimeoutsDescriptor.__get__-   s    sDII&--r   Nc                 V     t        |d      |      }t        || j                  |       y )N_convert)r   setattrr   )r   r   valueconverted_values       r   __set__z_TimeoutsDescriptor.__set__0   s%    2'#z259TYY0r   )r   N)r
   r   r   __doc__r   floatr    r&   r   r   r   r   r   "   s    .5 .1r   r   c            	       x    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y)Timeoutsimplicit_wait	page_loadr	   r   Nc                     | j                  |      | _        | j                  |      | _        | j                  |      | _        y)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"   _implicit_wait
_page_load_script)r   r+   r,   r	   s       r   r   zTimeouts.__init__6   s5    " #mmM:--	2}}V,r   r.   r/   r0   timeoutc                 r    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   s0    gU|,uW~,--@AAr   c                     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   sO    !##'#6#6HZ ??#'??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   sz    -e -E -u -]a -, ((89M  $L1I  !+F"B B# B
	, 	r   r*   N)	typingr   r   r   r   strr   r   r*   r   r   r   <module>r:      sF   $ ! y  S>L1 1&Y Yr   