
    hg                         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e
          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__     [/var/www/fb-scrape/myenv/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 )zj
        Return the value for the implicit wait. This does not return the value on the remote end
          )r   r    s    r   r   zTimeouts.implicit_wait9   s    
 "T))r   r   c                 :    |                      |          | _        dS )ze
        Sets 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 )zk
        Return 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_loadG   s    
 %%r   r   c                 :    |                      |          | _        dS )zf
        Sets 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_loadN   s    
 --
33r   c                     | j         dz  S )zh
        Return the value for the script wait. This does not return the value on the remote end
        r#   )r   r$   s    r   r   zTimeouts.scriptU   s    
 |d""r   r   c                 :    |                      |          | _        dS )zc
        Sets 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._convertc   sA    gU|,, 	FuW~~,---DEEEr   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_jsoni   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 . . . . ].F F# F F F F	, 	 	 	 	 	 	r   r   )typingr   sysversion_infor   typing_extensionsr   r   strr   objectr   r   r   r   <module>r:      s   & !            "JJJ
6!!$$$$$$$//////    y      S>LK K K K Kv K K K K Kr   