
    >fhC{              
          d dl Z d dlmZ d dlmZmZmZmZmZ d dl	m
Z
mZmZmZmZ d dlmZ d dlmZmZ 	  ed      Z ed      Zeeef   Zd	ed
eegef   fdZd	ed
eegef   fdZdeeef   d
eegef   fdZded
eegef   fdZded
eegef   fdZded
eegef   fdZded
eegef   fdZ deeef   d
eegeed   ef   f   fdZ!ded
eegeed   ef   f   fdZ"d8deded
eed   ef   fdZ#deeef   d
eege$e   f   fdZ%deeef   d
eege$e   f   fdZ&deeef   d
eegee$e   ed   f   f   fdZ'deeef   ded
eegef   fdZ(deeef   ded
eegef   fd Z)deeef   d!eded
eegef   fd"Z*deeeef   eef   d
eegef   fd#Z+deeeeef   f   d
eegeeef   f   fd$Z,deeeeef   f   d
eegeeef   f   fd%Z-d&eeeeef   f   d
eegeed   ef   f   fd'Z.ded
eegef   fd(Z/ded
eegef   fd)Z0deeef   d
eegef   fd*Z1ded+ed
eegef   fd,Z2deeef   d+ed
eegef   fd-Z3d.e4d
eegef   fd/Z5d0e$e   d
eegef   fd1Z6d
eegeeed   f   f   fd2Z7deeef   d!ed
eegef   fd3Z8d4eegef   d
eegeed   ef   f   fd5Z9d4eegeeed   f   f   d
eegee$e   ed   f   f   fd6Z:d4eegef   d
eegef   fd7Z;y)9    N)Iterable)AnyCallableLiteralTypeVarUnion)NoAlertPresentExceptionNoSuchElementExceptionNoSuchFrameExceptionStaleElementReferenceExceptionWebDriverException)Alert)	WebDriver
WebElementDTtitlereturnc                       dt         f fd}|S )zAn expectation for checking the title of a page.

    Parameters:
    -----------
    title : str
        The expected title, which must be an exact match.

    Returns:
    -------
    boolean : True if the title matches, False otherwise.
    driverc                 "    | j                   k(  S Nr   r   r   s    a/var/www/zara/venv/lib/python3.12/site-packages/selenium/webdriver/support/expected_conditions.py
_predicateztitle_is.<locals>._predicate8   s    ||u$$    r   r   r   s   ` r   title_isr    +   s    %9 % r   c                       dt         f fd}|S )a  An expectation for checking that the title contains a case-sensitive
    substring.

    Parameters:
    -----------
    title : str
        The fragment of title expected.

    Returns:
    -------
    boolean : True when the title matches, False otherwise.
    r   c                      | j                   v S r   r   r   s    r   r   z"title_contains.<locals>._predicateL   s    $$r   r   r   s   ` r   title_containsr#   >   s    %9 % r   locatorc                       dt         f fd}|S )az  An expectation for checking that an element is present on the DOM of a
    page. This does not necessarily mean that the element is visible.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.

    Returns:
    -------
    WebElement : The WebElement once it is located.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, "q")))
    r   c                 "     | j                    S r   )find_elementr   r$   s    r   r   z/presence_of_element_located.<locals>._predicateg   s    "v""G,,r   WebDriverOrWebElementr$   r   s   ` r   presence_of_element_locatedr,   R   s    *-0 - r   urlc                       dt         f fd}|S )a  An expectation for checking that the current url contains a case-
    sensitive substring.

    Parameters:
    -----------
    url : str
        The fragment of url expected.

    Returns:
    -------
    boolean : True when the url matches, False otherwise.
    r   c                      | j                   v S r   current_urlr   r-   s    r   r   z url_contains.<locals>._predicate{   s    f((((r   r   r-   r   s   ` r   url_containsr4   m       )9 ) r   patternc                       dt         f fd}|S )aQ  An expectation for checking the current url.

    Parameters:
    -----------
    pattern : str
        The pattern to match with the current url.

    Returns:
    -------
    boolean : True when the pattern matches, False otherwise.

    Notes:
    ------
    More powerful than url_contains, as it allows for regular expressions.
    r   c                 H    t        j                  | j                        d uS r   )researchr1   )r   r6   s    r   r   zurl_matches.<locals>._predicate   s    yy&"4"45TAAr   r   )r6   r   s   ` r   url_matchesr;      s    "B9 B r   c                       dt         f fd}|S )zAn expectation for checking the current url.

    Parameters:
    -----------
    url : str
        The expected url, which must be an exact match.

    Returns:
    -------
    boolean : True when the url matches, False otherwise.
    r   c                 "    | j                   k(  S r   r0   r2   s    r   r   zurl_to_be.<locals>._predicate       f((((r   r   r3   s   ` r   	url_to_ber?      s    )9 ) r   c                       dt         f fd}|S )a  An expectation for checking the current url is different than a given
    string.

    Parameters:
    -----------
    url : str
        The expected url, which must not be an exact match.

    Returns:
    -------
    boolean : True when the url does not match, False otherwise
    r   c                 "    | j                   k7  S r   r0   r2   s    r   r   zurl_changes.<locals>._predicate   r>   r   r   r3   s   ` r   url_changesrB      r5   r   Fc                       dt         f fd}|S )a  An expectation for checking that an element is present on the DOM of a
    page and visible. Visibility means that the element is not only displayed
    but also has a height and width that is greater than 0.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.

    Returns:
    -------
    WebElement : The WebElement once it is located and visible.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.NAME, "q")))
    r   c                 T    	 t         | j                         S # t        $ r Y yw xY wNF)_element_if_visibler'   r   r(   s    r   r   z1visibility_of_element_located.<locals>._predicate   s3    	&':v':':G'DEE- 		s    	''r)   r+   s   ` r   visibility_of_element_locatedrG      s    00  r   elementc                       fd}|S )a1  An expectation for checking that an element, known to be present on the
    DOM of a page, is visible.

    Parameters:
    -----------
    element : WebElement
        The WebElement to check.

    Returns:
    -------
    WebElement : The WebElement once it is visible.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(EC.visibility_of(driver.find_element(By.NAME, "q")))

    Notes:
    ------
    Visibility means that the element is not only displayed but also has
    a height and width that is greater than 0. element is the WebElement
    returns the (same) WebElement once it is visible
    c                     t              S r   )rF   _rH   s    r   r   z!visibility_of.<locals>._predicate   s    "7++r    rH   r   s   ` r   visibility_ofrO      s    6, r   
visibilityc                 0    | j                         |k(  r| S dS )a|  An expectation for checking that an element, known to be present on the
    DOM of a page, is of the expected visibility.

    Parameters:
    -----------
    element : WebElement
        The WebElement to check.
    visibility : bool
        The expected visibility of the element.

    Returns:
    -------
    WebElement : The WebElement once it is visible or not visible.
    F)is_displayed)rH   rP   s     r   rF   rF     s     **,
:7EEr   c                       dt         f fd}|S )ag  An expectation for checking that there is at least one element present
    on a web page.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.

    Returns:
    -------
    List[WebElement] : The list of WebElements once they are located.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> elements = WebDriverWait(driver, 10).until(EC.presence_of_all_elements_located((By.CLASS_NAME, "foo")))
    r   c                 "     | j                    S r   )find_elementsr(   s    r   r   z4presence_of_all_elements_located.<locals>._predicate(  s    #v##W--r   r)   r+   s   ` r    presence_of_all_elements_locatedrV     s    *.0 . r   c                       dt         f fd}|S )au  An expectation for checking that there is at least one element visible
    on a web page.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.

    Returns:
    -------
    List[WebElement] : The list of WebElements once they are located and visible.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> elements = WebDriverWait(driver, 10).until(EC.visibility_of_any_elements_located((By.CLASS_NAME, "foo")))
    r   c                 `     | j                    D cg c]  }t        |      s| c}S c c}w r   )rU   rF   )r   rH   r$   s     r   r   z6visibility_of_any_elements_located.<locals>._predicateC  s-    ';v';';W'EfGI\]dIefffs   ++r)   r+   s   ` r   "visibility_of_any_elements_locatedrY   .  s    *g0 g r   c                       dt         f fd}|S )a  An expectation for checking that all elements are present on the DOM of
    a page and visible. Visibility means that the elements are not only
    displayed but also has a height and width that is greater than 0.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the elements.

    Returns:
    -------
    List[WebElement] : The list of WebElements once they are located and visible.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> elements = WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CLASS_NAME, "foo")))
    r   c                 r    	  | j                    }|D ]  }t        |d      s y |S # t        $ r Y yw xY w)NFrP   )rU   rF   r   )r   elementsrH   r$   s      r   r   z6visibility_of_all_elements_located.<locals>._predicatea  sO    	+v++W5H# !&w5A ! O- 		s   !* * * 	66r)   r+   s   ` r   "visibility_of_all_elements_locatedr^   I  s    00  r   text_c                 $     dt         f fd}|S )a  An expectation for checking if the given text is present in the
    specified element.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.
    text_ : str
        The text to be present in the element.

    Returns:
    -------
    boolean : True when the text is present, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_text_in_element = WebDriverWait(driver, 10).until(
            EC.text_to_be_present_in_element((By.CLASS_NAME, "foo"), "bar")
        )
    r   c                 ^    	  | j                    j                  }|v S # t        $ r Y yw xY wrE   )r'   textr   r   element_textr$   r_   s     r   r   z1text_to_be_present_in_element.<locals>._predicate  s=    	.6..8==LL((- 		s     	,,r)   r$   r_   r   s   `` r   text_to_be_present_in_elementrf   n      20  r   c                 $     dt         f fd}|S )a  An expectation for checking if the given text is present in the
    element's value.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.
    text_ : str
        The text to be present in the element's value.

    Returns:
    -------
    boolean : True when the text is present, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_text_in_element_value = WebDriverWait(driver, 10).until(
    ...     EC.text_to_be_present_in_element_value((By.CLASS_NAME, "foo"), "bar")
    ... )
    r   c                 n    	  | j                    j                  d      }|y|v S # t        $ r Y yw xY w)NvalueFr'   get_attributer   rc   s     r   r   z7text_to_be_present_in_element_value.<locals>._predicate  sK    	.6..8FFwOL#L((- 		    ( ( 	44r)   re   s   `` r   #text_to_be_present_in_element_valuern     s    60  r   
attribute_c                 (     dt         f fd}|S )a)  An expectation for checking if the given text is present in the
    element's attribute.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.
    attribute_ : str
        The attribute to check the text in.
    text_ : str
        The text to be present in the element's attribute.

    Returns:
    -------
    boolean : True when the text is present, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_text_in_element_attribute = WebDriverWait(driver, 10).until(
    ...     EC.text_to_be_present_in_element_attribute((By.CLASS_NAME, "foo"), "bar", "baz")
    ... )
    r   c                 n    	  | j                    j                        }|y|v S # t        $ r Y yw xY wrE   rk   )r   rd   ro   r$   r_   s     r   r   z;text_to_be_present_in_element_attribute.<locals>._predicate  sK    	.6..8FFzRL#L((- 		rm   r)   )r$   ro   r_   r   s   ``` r   'text_to_be_present_in_element_attributerr     s    :0  r   c                       dt         f fd}|S )a  An expectation for checking whether the given frame is available to
    switch to.

    Parameters:
    -----------
    locator : Union[Tuple[str, str], str, WebElement]
        Used to find the frame.

    Returns:
    -------
    boolean : True when the frame is available, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it("frame_name"))

    Notes:
    ------
    If the frame is available it switches the given driver to the
    specified frame.
    r   c                     	 t        t              r9t        t              s)| j                  j	                   | j
                          y| j                  j	                         y# t        $ r Y yw xY w)NTF)
isinstancer   str	switch_toframer'   r   r(   s    r   r   z:frame_to_be_available_and_switch_to_it.<locals>._predicate  sm    	'8,Z5M  &&':v':':G'DE    &&w/# 		s   AA( A( (	A43A4r   r+   s   ` r   &frame_to_be_available_and_switch_to_itry     s    69  r   c                       dt         f fd}|S )a  An Expectation for checking that an element is either invisible or not
    present on the DOM.

    Parameters:
    -----------
    locator : Union[WebElement, Tuple[str, str]]
        Used to find the element.

    Returns:
    -------
    boolean : True when the element is invisible or not present, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_invisible = WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((By.CLASS_NAME, "foo")))

    Notes:
    ------
    - In the case of NoSuchElement, returns true because the element is not
    present in DOM. The try block checks if the element is present but is
    invisible.
    - In the case of StaleElementReference, returns true because stale element
    reference implies that element is no longer visible.
    r   c                     	 }t        |t              s | j                  | }t        |d      S # t        t
        f$ r Y yw xY w)NFr\   T)ru   r   r'   rF   r
   r   )r   targetr$   s     r   r   z3invisibility_of_element_located.<locals>._predicate(  sP    	Ffj1,,,f5&v%@@&(FG 	 	s   -1 AAr)   r+   s   ` r   invisibility_of_element_locatedr}   	  s    >0  r   c                     t        |       S )a  An Expectation for checking that an element is either invisible or not
    present on the DOM.

    Parameters:
    -----------
    element : Union[WebElement, Tuple[str, str]]
        Used to find the element.

    Returns:
    -------
    boolean : True when the element is invisible or not present, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_invisible_or_not_present = WebDriverWait(driver, 10).until(
    ...     EC.invisibility_of_element(driver.find_element(By.CLASS_NAME, "foo"))
    ... )
    )r}   )rH   s    r   invisibility_of_elementr   9  s    0 +733r   markc                       dt         f fd}|S )am  An Expectation for checking an element is visible and enabled such that
    you can click it.

    Parameters:
    -----------
    mark : Union[WebElement, Tuple[str, str]]
        Used to find the element.

    Returns:
    -------
    WebElement : The WebElement once it is located and clickable.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "foo")))
    r   c                     }t        |t              s | j                  | } t        |      |       }|r|j	                         r|S yrE   )ru   r   r'   rO   
is_enabled)r   r|   rH   r   s      r   r   z+element_to_be_clickable.<locals>._predicatem  sK    &*-(V((&1F'-'/w))+Nr   r)   )r   r   s   ` r   element_to_be_clickabler   T  s    20  r   c                       fd}|S )aQ  Wait until an element is no longer attached to the DOM.

    Parameters:
    -----------
    element : WebElement
        The element to wait for.

    Returns:
    -------
    boolean : False if the element is still attached to the DOM, true otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_element_stale = WebDriverWait(driver, 10).until(EC.staleness_of(driver.find_element(By.CLASS_NAME, "foo")))
    c                 F    	 j                          y# t        $ r Y yw xY wNFT)r   r   rK   s    r   r   z staleness_of.<locals>._predicate  s)    	 - 		s    	  rM   rN   s   ` r   staleness_ofr   y  s    ( r   c                       fd}|S )aZ  An expectation for checking the selection is selected.

    Parameters:
    -----------
    element : WebElement
        The WebElement to check.

    Returns:
    -------
    boolean : True if the element is selected, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_selected = WebDriverWait(driver, 10).until(EC.element_to_be_selected(driver.find_element(
            By.CLASS_NAME, "foo"))
        )
    c                 $    j                         S r   is_selectedrK   s    r   r   z*element_to_be_selected.<locals>._predicate  s    ""$$r   rM   rN   s   ` r   element_to_be_selectedr     s    ,% r   c                       dt         f fd}|S )aB  An expectation for the element to be located is selected.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.

    Returns:
    -------
    boolean : True if the element is selected, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_selected = WebDriverWait(driver, 10).until(EC.element_located_to_be_selected((By.CLASS_NAME, "foo")))
    r   c                 >     | j                    j                         S r   )r'   r   r(   s    r   r   z2element_located_to_be_selected.<locals>._predicate  s    "v""G,88::r   r)   r+   s   ` r   element_located_to_be_selectedr     s    (;0 ; r   r   c                       fd}|S )a  An expectation for checking if the given element is selected.

    Parameters:
    -----------
    element : WebElement
        The WebElement to check.
    is_selected : bool

    Returns:
    -------
    boolean : True if the element's selection state is the same as is_selected

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_selected = WebDriverWait(driver, 10).until(
    ...     EC.element_selection_state_to_be(driver.find_element(By.CLASS_NAME, "foo"), True)
    ... )
    c                 *    j                         k(  S r   r   )rL   rH   r   s    r   r   z1element_selection_state_to_be.<locals>._predicate  s    ""$33r   rM   )rH   r   r   s   `` r   element_selection_state_to_ber     s    .4 r   c                 $     dt         f fd}|S )a  An expectation to locate an element and check if the selection state
    specified is in that state.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.
    is_selected : bool

    Returns:
    -------
    boolean : True if the element's selection state is the same as is_selected

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_selected = WebDriverWait(driver, 10).until(EC.element_located_selection_state_to_be(
            (By.CLASS_NAME, "foo"), True)
        )
    r   c                 h    	  | j                    }|j                         k(  S # t        $ r Y yw xY wrE   )r'   r   r   )r   rH   r   r$   s     r   r   z9element_located_selection_state_to_be.<locals>._predicate  s@    	)f))73G&&(K77- 		   !% 	11r)   )r$   r   r   s   `` r   %element_located_selection_state_to_ber     s    40  r   num_windowsc                       dt         f fd}|S )a  An expectation for the number of windows to be a certain value.

    Parameters:
    -----------
    num_windows : int
        The expected number of windows.

    Returns:
    -------
    boolean : True when the number of windows matches, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_number_of_windows = WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2))
    r   c                 4    t        | j                        k(  S r   lenwindow_handles)r   r   s    r   r   z+number_of_windows_to_be.<locals>._predicate"  s    6(()[88r   r   )r   r   s   ` r   number_of_windows_to_ber     s    &99 9 r   current_handlesc                       dt         f fd}|S )aq  An expectation that a new window will be opened and have the number of
    windows handles increase.

    Parameters:
    -----------
    current_handles : List[str]
        The current window handles.

    Returns:
    -------
    boolean : True when a new window is opened, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.support.ui import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_new_window_opened = WebDriverWait(driver, 10).until(EC.new_window_is_opened(driver.window_handles))
    r   c                 F    t        | j                        t              kD  S r   r   )r   r   s    r   r   z(new_window_is_opened.<locals>._predicate=  s    6(()C,@@@r   r   )r   r   s   ` r   new_window_is_openedr   (  s    *A9 A r   c                      dt         fd} | S )a  An expectation for checking if an alert is currently present and
    switching to it.

    Returns:
    -------
    Alert : The Alert once it is located.

    Example:
    --------
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> alert = WebDriverWait(driver, 10).until(EC.alert_is_present())

    Notes:
    ------
    If the alert is present it switches the given driver to it.
    r   c                 N    	 | j                   j                  S # t        $ r Y yw xY wrE   )rw   alertr	   )r   s    r   r   z$alert_is_present.<locals>._predicateV  s+    	##)))& 		s    	$$r   )r   s    r   alert_is_presentr   C  s    &9  r   c                 $     dt         f fd}|S )a  An expectation for checking if the given attribute is included in the
    specified element.

    Parameters:
    -----------
    locator : Tuple[str, str]
        Used to find the element.
    attribute_ : str
        The attribute to check.

    Returns:
    -------
    boolean : True when the attribute is included, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> is_attribute_in_element = WebDriverWait(driver, 10).until(
    ...     EC.element_attribute_to_include((By.CLASS_NAME, "foo"), "bar")
    ... )
    r   c                 h    	  | j                    j                        }|d uS # t        $ r Y yw xY wrE   rk   )r   element_attributero   r$   s     r   r   z0element_attribute_to_include.<locals>._predicatex  sC    	 3 3 3W = K KJ W$D00- 		r   r)   )r$   ro   r   s   `` r   element_attribute_to_includer   _  rg   r   expected_conditionsc                        dt         f fd}|S )a0  An expectation that any of multiple expected conditions is true.

    Parameters:
    -----------
    expected_conditions : Callable[[D], T]
        The list of expected conditions to check.

    Returns:
    -------
    T : The result of the first matching condition, or False if none do.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(
    ... EC.any_of(EC.presence_of_element_located((By.NAME, "q"),
    ... EC.visibility_of_element_located((By.NAME, "q"))))

    Notes:
    ------
    Equivalent to a logical 'OR'. Returns results of the first matching
    condition, or False if none do.
    r   c                 P    D ]  }	  ||       }|r|c S  y# t         $ r Y  w xY wrE   r   r   expected_conditionresultr   s      r   any_of_conditionz any_of.<locals>.any_of_condition  sH    "5 	+F3!M 	  & s   	%%r   )r   r   s   ` r   any_ofr     s    6  r   c                        dt         f fd}|S )a  An expectation that all of multiple expected conditions is true.

    Parameters:
    -----------
    expected_conditions : Callable[[D], Union[T, Literal[False]]]
        The list of expected conditions to check.

    Returns:
    -------
    List[T] : The results of all the matching conditions, or False if any do not.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> elements = WebDriverWait(driver, 10).until(
    ... EC.all_of(EC.presence_of_element_located((By.NAME, "q"),
    ... EC.visibility_of_element_located((By.NAME, "q"))))

    Notes:
    ------
    Equivalent to a logical 'AND'.
    Returns: When any ExpectedCondition is not met: False.
    When all ExpectedConditions are met: A List with each ExpectedCondition's return value.
    r   c                 v    g }D ]   }	  ||       }|s y|j                  |       " |S # t        $ r Y  yw xY wrE   )appendr   )r   resultsr   r   r   s       r   all_of_conditionz all_of.<locals>.all_of_condition  sT    "5 	+F3 v&	  & s   
++	88r   )r   r   s   ` r   all_ofr     s    <
 
 r   c                        dt         f fd}|S )a  An expectation that none of 1 or multiple expected conditions is true.

    Parameters:
    -----------
    expected_conditions : Callable[[D], Any]
        The list of expected conditions to check.

    Returns:
    -------
    boolean : True if none of the conditions are true, False otherwise.

    Example:
    --------
    >>> from selenium.webdriver.common.by import By
    >>> from selenium.webdriver.support.ui import WebDriverWait
    >>> from selenium.webdriver.support import expected_conditions as EC
    >>> element = WebDriverWait(driver, 10).until(
    ... EC.none_of(EC.presence_of_element_located((By.NAME, "q"),
    ... EC.visibility_of_element_located((By.NAME, "q"))))

    Notes:
    ------
    Equivalent to a logical 'NOT-OR'. Returns a Boolean
    r   c                 L    D ]  }	  ||       }|r y y# t         $ r Y w xY wr   r   r   s      r   none_of_conditionz"none_of.<locals>.none_of_condition  sF    "5 	+F3  	  & s   
	##r   )r   r   s   ` r   none_ofr     s    4!  r   )T)<r9   collections.abcr   typingr   r   r   r   r   selenium.common.exceptionsr	   r
   r   r   r   selenium.webdriver.common.alertr   #selenium.webdriver.remote.webdriverr   r   r   r   r*   rv   boolr    r#   tupler,   r4   r;   r?   rB   rG   rO   rF   listrV   rY   r^   rf   rn   rr   ry   r}   r   r   r   r   r   r   r   intr   r   r   r   r   r   r   rM   r   r   <module>r      s  $ 
 $ 9 9  2 E
 CLCLi34 C Hi[$%67 &# (I;+<"= (sCx XG\F]_iFi=j 6c h	{D'89 ( 9+t*;!< .3 8YK$56 &S Xyk4&78 (38_$%uWU^Z-G'HHIB: (C5%PZ@Z:[3[*\ BF F FwW\~_iOiIj F$eCHo (LaKbdhisdtKtBu 6c3h HNcMdfjkufvMvDw 6"38_"$%uT*-=wu~-M'NNO"J 5c?  3  8UjTkmqTqKr  F$38_$%($$%t+,$N&38_&*-&69&$%t+,&R%5c?C34%yk4 %P-:uS#X./-$%uZ-='>>?-`4:uS#X./4$%uZ-='>>?46"

E#s(O+
,"$%uWU^Z-G'HHI"J* 3%+)> >J 8SE4K3H 8E#s(O J_I`bfIf@g 4: D XWZV[]aVaMb :!38_!+/!$%t+,!H 9+t:K1L 2$s) )dAR8S 6(I;eWU^6K0L#LM 8 %S/  s  xYnXoquXuOv  F%1#q&!1 %hsE'RW.Z[J[D\?\6] %P*"A3a.?(@#@A*qc5a'%.0112*Z$(A38"4 $1#t)9L $r   