Ë
    `§1h{  ã            
       óÜ  — d dl Z d dlmZ d dlmZmZ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ÚListÚLiteralÚTupleÚTypeVarÚUnion)ÚNoAlertPresentExceptionÚNoSuchElementExceptionÚNoSuchFrameExceptionÚStaleElementReferenceExceptionÚWebDriverException)ÚAlert)Ú	WebDriverÚ
WebElementÚDÚTÚtitleÚreturnc                 ó    ‡ — dt         fˆ fd„}|S )zôAn 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    €úl/var/www/skyplay_api_hub/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_containsr6   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Úsearchr3   )r   r8   s    €r   r   zurl_matches.<locals>._predicate’   s   ø€ Ü�y‰y˜ &×"4Ñ"4Ó5¸TÐAÐAr   r    )r8   r   s   ` r   Úurl_matchesr=   �   s   ø€ ð"Bœ9õ Bð Ðr   c                 ó    ‡ — dt         fˆ fd„}|S )zìAn 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   r2   r4   s    €r   r   zurl_to_be.<locals>._predicate¥   ó   ø€ Ø�f×(Ñ(Ñ(Ð(r   r    r5   s   ` r   Ú	url_to_berA   ˜   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   r2   r4   s    €r   r   zurl_changes.<locals>._predicate¹   r@   r   r    r5   s   ` r   Úurl_changesrD   «   r7   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_locatedrI   ¿   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   )rH   ©Ú_rJ   s    €r   r   z!visibility_of.<locals>._predicateû   s   ø€ Ü" 7Ó+Ð+r   © ©rJ   r   s   ` r   Úvisibility_ofrQ   à   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)rJ   rR   s     r   rH   rH     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_locatedrX     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   )rW   rH   )r   rJ   r&   s     €r   r   z6visibility_of_any_elements_located.<locals>._predicateC  s-   ø€ Ø'; v×';Ñ';¸WÐ'EÖf˜GÔI\Ð]dÕIe’ÒfÐfùÒfs   “+¤+r+   r-   s   ` r   Ú"visibility_of_any_elements_locatedr[   .  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©rR   )rW   rH   r   )r   ÚelementsrJ   r&   s      €r   r   z6visibility_of_all_elements_located.<locals>._predicatea  sO   ø€ ð	Ø+�v×+Ñ+¨WÐ5ˆHØ#ò !�Ü& w¸5Ö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rG   )r)   Útextr   ©r   Úelement_textr&   ra   s     €€r   r   z1text_to_be_present_in_element.<locals>._predicate‡  s=   ø€ ð	Ø.˜6×.Ñ.°Ð8×=Ñ=ˆLØ˜LÐ(Ð(øÜ-ò 	Ùð	ús   ƒ   	,«,r+   ©r&   ra   r   s   `` r   Útext_to_be_present_in_elementrh   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                 óh   •— 	  | j                   ‰Ž j                  d«      }‰|v S # t        $ r Y yw xY w)NÚvalueF©r)   Úget_attributer   re   s     €€r   r   z7text_to_be_present_in_element_value.<locals>._predicate¬  sB   ø€ ð	Ø.˜6×.Ñ.°Ð8×FÑFÀwÓOˆLØ˜LÐ(Ð(øÜ-ò 	Ùð	úó   ƒ!% ¥	1°1r+   rg   s   `` r   Ú#text_to_be_present_in_element_valuerp   ‘  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rG   rm   )r   rf   rq   r&   ra   s     €€€r   r   z;text_to_be_present_in_element_attribute.<locals>._predicateÓ  sK   ø€ ð	Ø.˜6×.Ñ.°Ð8×FÑFÀzÓRˆLØÐ#ØØ˜LÐ(Ð(øÜ-ò 	Ùð	ús   ƒ ( ¤( ¨	4³4r+   )r&   rq   ra   r   s   ``` r   Ú'text_to_be_present_in_element_attributert   ¶  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_itr{   ß  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)rw   r   r)   rH   r   r   )r   Útargetr&   s     €r   r   z3invisibility_of_element_located.<locals>._predicate&  sP   ø€ ð	ØˆFÜ˜f¤jÔ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   )rJ   s    r   Úinvisibility_of_elementr�   7  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rG   )rw   r   r)   rQ   Ú
is_enabled)r   r~   rJ   r‚   s      €r   r   z+element_to_be_clickable.<locals>._predicatek  sK   ø€ ØˆÜ˜&¤*Ô-Ø(�V×(Ñ(¨&Ð1ˆFØ'”- Ó'¨Ó/ˆÙ�w×)Ñ)Ô+ØˆNØr   r+   )r‚   r   s   ` r   Úelement_to_be_clickabler†   R  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   rM   s    €r   r   z staleness_of.<locals>._predicate‹  s)   ø€ ð	à×ÑÔ ØøÜ-ò 	Ùð	ús   ƒ ”	 Ÿ rO   rP   s   ` r   Ústaleness_ofrŠ   w  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_selectedrM   s    €r   r   z*element_to_be_selected.<locals>._predicate¬  s   ø€ Ø×"Ñ"Ó$Ð$r   rO   rP   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�   )rN   rJ   rŽ   s    €€r   r   z1element_selection_state_to_be.<locals>._predicateã  s   ø€ Ø×"Ñ"Ó$¨Ñ3Ð3r   rO   )rJ   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rG   )r)   rŽ   r   )r   rJ   rŽ   r&   s     €€r   r   z9element_located_selection_state_to_be.<locals>._predicate  s@   ø€ ð	Ø)�f×)Ñ)¨7Ð3ˆGØ×&Ñ&Ó(¨KÑ7Ð7øÜ-ò 	Ùð	úro   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   ø€ ð&9œ9õ 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rG   )ry   Úalertr   )r   s    r   r   z$alert_is_present.<locals>._predicateT  s+   € ð	Ø×#Ñ#×)Ñ)Ð)øÜ&ò 	Ùð	ús   ‚ ˜	$£$r    )r   s    r   Úalert_is_presentr§   A  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rG   rm   )r   Úelement_attributerq   r&   s     €€r   r   z0element_attribute_to_include.<locals>._predicatev  sC   ø€ ð	Ø 3 × 3Ñ 3°WÐ =× KÑ KÈJÓ WÐØ$¨DÐ0Ð0øÜ-ò 	Ùð	úro   r+   )r&   rq   r   s   `` r   Úelement_attribute_to_includer«   ]  ri   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rG   ©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rG   )Ú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)<r;   Úcollections.abcr   Útypingr   r   r   r   r   r	   r
   Úselenium.common.exceptionsr   r   r   r   r   Úselenium.webdriver.common.alertr   Ú#selenium.webdriver.remote.webdriverr   r   r   r   r,   rx   Úboolr"   r%   r.   r6   r=   rA   rD   rI   rQ   rH   rX   r[   r`   rh   rp   rt   r{   r   r�   r†   rŠ   r�   r’   r•   r˜   ÚintrŸ   r£   r§   r«   rµ   r»   r¿   rO   r   r   ú<module>rÇ      s  ðó$ 
Ý $ß F× FÑ F÷õ õ 2ß Eðñ
 ˆCƒL€ÙˆCƒL€à˜i¨Ð3Ñ4Ð ð�Cð ˜H i [°$Ð%6Ñ7ó ð&˜#ð  (¨I¨;¸Ð+<Ñ"=ó ð(¨¨s°C¨x©ð ¸XÐG\ÐF]Ð_iÐFiÑ=jó ð6�cð ˜h¨	 {°DÐ'8Ñ9ó ð(˜ð  ¨9¨+°tÐ*;Ñ!<ó ð.�3ð ˜8 Y K°Ð$5Ñ6ó ð&�Sð ˜X y k°4Ð&7Ñ8ó ð(Ø�3˜�8‰_ðàÐ$Ð% u¨W°U©^¸ZÐ-GÑ'HÐHÑIóðB˜:ð ¨(°C°5¸%ÀÈÁÐPZÐ@ZÑ:[Ð3[Ñ*\ó ñBF ð F¸ð FÈÈwÐW\É~Ð_iÐOiÑIjó Fð$¨e°C¸°H©oð À(ÐLaÐKbÐdhÐisÑdtÐKtÑBuó ð6°°c¸3°h±ð ÀHÐNcÐMdÐfjÐkuÑfvÐMvÑDwó ð6"Ø�3˜�8‰_ð"àÐ$Ð% u¨T°*Ñ-=¸wÀu¹~Ð-MÑ'NÐNÑOó"ðJ ¨5°°c°©?ð  À3ð  È8ÐUjÐTkÐmqÐTqÑKró  ðF"Ø�3˜�8‰_ð"Ø%(ð"àÐ$Ð% tÐ+Ñ,ó"ðJ&Ø�3˜�8‰_ð&Ø*-ð&Ø69ð&àÐ$Ð% tÐ+Ñ,ó&ðR%Ø�5˜˜c˜‘? C¨Ð3Ñ4ð%àˆyˆk˜4ÐÑ ó%ðP-Ø�:˜u S¨# X™Ð.Ñ/ð-àÐ$Ð% u¨Z¸Ð-=Ñ'>Ð>Ñ?ó-ð`4Ø�:˜u S¨# X™Ð.Ñ/ð4àÐ$Ð% u¨Z¸Ð-=Ñ'>Ð>Ñ?ó4ð6"Ø
�
˜E # s (™OÐ+Ñ
,ð"àÐ$Ð% u¨W°U©^¸ZÐ-GÑ'HÐHÑIó"ðJ˜*ð ¨°3°%¸°+Ñ)>ó ð> Jð °8¸S¸EÀ4¸KÑ3Hó ð8¨E°#°s°(©Oð ÀÐJ_ÐI`ÐbfÐIfÑ@gó ð4¨:ð ÀDð ÈXÐWZÐV[Ð]aÐVaÑMbó ð:!Ø�3˜�8‰_ð!Ø+/ð!àÐ$Ð% tÐ+Ñ,ó!ðH¨ð °¸9¸+ÀtÐ:KÑ1Ló ð2¨$¨s©)ð ¸À)ÀÈdÐARÑ8Só ð6˜( I ;°°e¸WÀU¹^Ð6KÑ0LÐ#LÑMó ð8 ¨%°°S°©/ð  Àsð  ÈxÐYnÐXoÐquÐXuÑOvó  ðF% ¨1¨#¨q¨&Ñ!1ð %°hÀ¸sÀEÈ'ÐRWÉ.ÐZ[ÐJ[ÑD\Ð?\Ñ6]ó %ðP*Ø" A 3¨¨a°¸±Ð.?Ñ(@Ð#@ÑAð*àˆqˆc�5˜˜a™ '¨%¡.Ð0Ñ1Ð1Ñ2ó*ðZ$ (¨A¨3°¨8Ñ"4ð $¸À1À#ÀtÀ)Ñ9Lô $r   