
    Eg                         d dl mZ er-d dlZej        dk    rd dl mZ n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
dS )    )TYPE_CHECKINGN)      )	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__     W/var/www/sysmax/venv/lib/python3.11/site-packages/selenium/webdriver/common/timeouts.pyr   r      s+         r   r   F)total)Dictc            	          e Zd ZddedededdfdZedefd            Zej        d	eddfd
            Zedefd            Zej        deddfd            Zedefd            Z	e	j        deddfd            Z	dede
fdZdefdZdS )Timeoutsr   implicit_wait	page_loadr   returnNc                     |                      |          | _        |                      |          | _        |                      |          | _        dS )a  Create a new Timeout object.

        :Args:
         - implicit_wait - Either an int or a float. The number passed in needs to how many
            seconds the driver will wait.
         - page_load - Either an int or a float. The number passed in needs to how many
            seconds the driver will wait.
         - script - Either an int or a float. The number passed in needs to how many
            seconds the driver will wait.
        N)_convert_implicit_wait
_page_load_script)selfr   r   r   s       r   __init__zTimeouts.__init__)   sB     #mmM::--	22}}V,,r   c                     | j         dz  S )zjReturn the value for the implicit wait.

        This does not return the value on the remote end
          )r   r    s    r   r   zTimeouts.implicit_wait8   s     "T))r   r   c                 :    |                      |          | _        dS )zeSets the value for the implicit wait.

        This does not set the value on the remote end
        N)r   r   )r    r   s     r   r   zTimeouts.implicit_wait@   s     #mmN;;r   c                     | j         dz  S )zkReturn the value for the page load wait.

        This does not return the value on the remote end
        r#   )r   r$   s    r   r   zTimeouts.page_loadH   s     %%r   r   c                 :    |                      |          | _        dS )zfSets the value for the page load wait.

        This does not set the value on the remote end
        N)r   r   )r    r   s     r   r   zTimeouts.page_loadP   s     --
33r   c                     | j         dz  S )zhReturn the value for the script wait.

        This does not return the value on the remote end
        r#   )r   r$   s    r   r   zTimeouts.scriptX   s     |d""r   r   c                 :    |                      |          | _        dS )zcSets the value for the script wait.

        This does not set the value on the remote end
        N)r   r   )r    r   s     r   r   zTimeouts.script`   s     }}W--r   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   float	TypeError)r    r*   s     r   r   zTimeouts._converth   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   r   )r    timeoutss     r   _to_jsonzTimeouts._to_jsonm   sP    !# 	7#'#6HZ ? 	3#'?HZ < 	.!%HXr   )r   r   r   )r   r   r   r-   r!   propertyr   setterr   r   r   r   r   r1   r   r   r   r   r   (   s       - -e -E -u -]a - - - - *u * * * X* <E <d < < < < &5 & & & X& 4E 4d 4 4 4 4 # # # # X# ].e . . . . ].B B# B B B B
	, 	 	 	 	 	 	r   r   )typingr   sysversion_infor   typing_extensionsr   r   strr   r   r   r   r   <module>r9      s   & !           "JJJ
6!!$$$$$$$//////    y      S>LN N N N N N N N N Nr   