Ë
    `§1hÔÝ  ã                   ó°  — d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZ ddlmZmZ ddlmZmZ ddlmZ ddl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" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZC ddlDmEZE ddlFmGZG ddlHmIZImJZJ ddlKmLZL dd lMmNZN dd!lOmPZP dd"lQmRZR dd#lSmTZT dd$lUmVZV dd%lWmXZX dd&lYmZZZ da[da\d'„ Z]d(„ Z^	 d7d)e_d*ee`ePf   d+ead,ead-eeA   d.ePfd/„Zbd0ee1   d.efd1„Zc G d2„ d3e¬4«      Zd G d5„ d6ed«      Zey)8zThe WebDriver implementation.é    N)ÚABCMeta)Ú	b64decodeÚurlsafe_b64encode)ÚasynccontextmanagerÚcontextmanager)Úimport_module)ÚAnyÚDictÚListÚOptionalÚTypeÚUnion)ÚInvalidArgumentExceptionÚJavascriptExceptionÚNoSuchCookieExceptionÚNoSuchElementExceptionÚWebDriverException)ÚBrowser)ÚBrowsingContext)ÚNetwork)ÚScript)ÚSession)ÚStorage)ÚWebExtension)ÚBy)Ú
ArgOptionsÚBaseOptions)ÚPrintOptions)ÚTimeouts)Ú
CredentialÚVirtualAuthenticatorOptionsÚrequired_virtual_authenticator)Ú
RelativeByé   )ÚDialogé   )ÚBidiConnection)ÚClientConfig)ÚCommand)ÚErrorHandler)ÚFedCM)ÚFileDetectorÚLocalFileDetector)ÚLocatorConverter)ÚMobile)ÚRemoteConnection)Ú	ScriptKey)Ú
ShadowRoot)ÚSwitchTo)Ú
WebElement)ÚWebSocketConnectionc                  ó(   — t         st        d«      a y y )Nz"selenium.webdriver.common.bidi.cdp)Úcdpr   © ó    úa/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.pyÚ
import_cdpr;   P   s   € åÜÐ@ÓA‰ð r9   c                 óz   — t        j                  | «      } i }| j                  «       D ]
  \  }}|||<   Œ di g|dœiS )a   Makes a W3C alwaysMatch capabilities object.

    Filters out capability names that are not in the W3C spec. Spec-compliant
    drivers will reject requests containing unknown capability names.

    Moves the Firefox profile, if present, from the old location to the new Firefox
    options object.

    Parameters:
    -----------
    caps : dict
        - A dictionary of capabilities requested by the caller.
    Úcapabilities)Ú
firstMatchÚalwaysMatch)ÚcopyÚdeepcopyÚitems)ÚcapsÚalways_matchÚkÚvs       r:   Ú_create_capsrG   V   sK   € ô �=‰=˜Ó€DØ€LØ—
‘
“ò ‰ˆˆ1Øˆ�QŠðà¨B¨4ÀÑMÐNÐNr9   r=   Úcommand_executorÚ
keep_aliveÚignore_local_proxyÚclient_configÚreturnc                 óð   ‡ — t        |t        «      r#|xs t        |¬«      }||_        t	        |¬«      }ddlm} ddlm} ddl	m
} ddlm} ||||g}	t        ˆ fd„|	D «       t        «      }
 |
||||¬	«      S )
N)Úremote_server_addr)rK   r   )ÚChromeRemoteConnection)ÚEdgeRemoteConnection)ÚFirefoxRemoteConnection)ÚSafariRemoteConnectionc              3   ó`   •K  — | ]%  }|j                   ‰j                  d «      k(  sŒ"|–— Œ' y­w)ÚbrowserNameN)Úbrowser_nameÚget)Ú.0Úcr=   s     €r:   ú	<genexpr>z(get_remote_connection.<locals>.<genexpr>|   s(   øè ø€ Ò_˜!¨Q¯^©^¸|×?OÑ?OÐP]Ó?^Ó-^”AÑ_ùs   ƒ#.§.)rN   rI   Úignore_proxyrK   )Ú
isinstanceÚstrr(   rN   r0   Ú+selenium.webdriver.chrome.remote_connectionrO   Ú)selenium.webdriver.edge.remote_connectionrP   Ú,selenium.webdriver.firefox.remote_connectionrQ   Ú+selenium.webdriver.safari.remote_connectionrR   Únext)r=   rH   rI   rJ   rK   rO   rP   rQ   rR   Ú
candidatesÚhandlers   `          r:   Úget_remote_connectionrd   k   s|   ø€ ô Ð"¤CÔ(Ø%ÒZ¬ÐIYÔ)ZˆØ+;ˆÔ(Ü+¸-ÔHÐÝRÝNÝTÝRà(Ð*>Ð@VÐXoÐp€JÜÓ_˜zÔ_ÔaqÓr€GáØ+ØØ'Ø#ô	ð r9   Úoptionsc                 óð  — di i}g }| D ]!  }|j                  |j                  «       «       Œ# t        |«      }i }t        |«      D ]n  }|}|dz   |k  sŒ||   j	                  «       }|D ]I  }	|	||dz      j	                  «       v sŒ||   |	   ||dz      |	   k(  sŒ1|j                  |	||   |	   i«       ŒK Œp i }
|j                  «       D ]
  \  }}||
|<   Œ |D ]  }|
D ]  }||= Œ Œ |
|d   d<   ||d   d<   |S )Nr=   r&   r?   r>   )ÚappendÚto_capabilitiesÚlenÚrangeÚkeysÚupdaterB   )re   r=   ÚoptsÚoptÚ	opts_sizeÚsamesiesÚiÚ	min_indexÚ
first_keysÚkysÚalwaysrE   rF   s                r:   Úcreate_matchesrv   †   sW  € Ø" BÐ'€LØ€DØò +ˆØ�‰�C×'Ñ'Ó)Õ*ð+ä�D“	€IØ€Hô �9Óò EˆØˆ	Øˆq‰5�9ÓØ˜i™×-Ñ-Ó/ˆJà!ò E�Ø˜$˜q 1™u™+×*Ñ*Ó,Ò,Ø˜I‘ sÑ+¨t°A¸±E©{¸3Ñ/?Ó?Ø Ÿ™¨¨d°9©o¸cÑ.BÐ(CÕDñEðEð €FØ—‘Ó ò ‰ˆˆ1ØˆˆqŠ	ðð ò ˆØò 	ˆAØ�!‘ñ	ðð 39€L�Ñ  Ñ/Ø15€L�Ñ  Ñ.àÐr9   c                   ó   — e Zd ZdZy)ÚBaseWebDriverz«Abstract Base Class for all Webdriver subtypes.

    ABC's allow custom implementations of Webdriver to be registered so
    that isinstance type checks will succeed.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r8   r9   r:   rx   rx   ¨   s   „ òr9   rx   )Ú	metaclassc                   óÄ  — e Zd ZdZeZeZ	 	 	 	 	 	 	 d}dee	e
f   dedee   deeeee   f      dee   dee   d	ee   d
dfd„Zd„ Zd„ Zdeee      dee   deej2                     fd„Zed„ «       Zed
efd„«       Zed
e	fd„«       Z d„ Z!d„ Z"de#d
dfd„Z$d„ Z%de	d
efd„Z&d„ Z'de	de#fd„Z(d~d e	d!ee#e	e)f      d
e#e	e)f   fd"„Z*d#e	d
dfd$„Z+ed
e	fd%„«       Z,d~d&e	d
e-fd'„Z.d(e-d
dfd)„Z/d
ee	   fd*„Z0d&e	fd+„Z1d&e	fd,„Z2ed
e	fd-„«       Z3ed
e	fd.„«       Z4dd/„Z5dd0„Z6ed
e	fd1„«       Z7ed
ee	   fd2„«       Z8dd3„Z9dd4„Z:dd5„Z;d~d6ee<   d
e	fd7„Z=ed
e>fd8„«       Z?dd9„Z@dd:„ZAdd;„ZBd
ee#   fd<„ZCd
eeD   fd=„ZEdd>„ZFdd?„ZGdd@„ZHdAeId
dfdB„ZJdAeId
dfdC„ZKdAeId
dfdD„ZLed
eMfdE„«       ZNeNjž                  ddF„«       ZNePj¢                  dfdGee	   d
efdH„ZRePj¢                  dfdGee	   d
ee   fdI„ZSed
e#fdJ„«       ZTd
efdK„ZUd
efdL„ZVd
eWfdM„ZXd
e	fdN„ZYd€dOe	d
dfdP„ZZd€dOe	d
e#fdQ„Z[d€dReIdSeIdOe	d
e#fdT„Z\d€d
e#fdU„Z]dOe	d
dfdV„Z^d
e#fdW„Z_d�d
e#fdX„Z`ed
efdY„«       Zaeajž                  ddZ„«       Zaed[„ «       Zbebjž                  dd\„«       Zbd]„ Zcedd^„ «       Zeed_„ «       Zfd`„ Zgeda„ «       Zhedb„ «       Ziedc„ «       Zjedd„ «       Zkede„ «       Zledf„ «       Zmdg„ Zndeod
dfdh„Zped
e	fdi„«       Zqerddj„«       Zserdketd
dfdl„«       Zuerd
eet   fdm„«       Zverdnee	ewf   d
dfdo„«       Zxerddp„«       Zyerdqed
dfdr„«       Zzd
e{fds„Z|dte	due	d
dfdv„Z}ddw„Z~ed
efdx„«       Z€ed
efdy„«       Z�dz„ Z‚ed{„ «       Zƒd‚d|„Z„y)ƒÚ	WebDriveraÇ  Controls a browser by sending commands to a remote server. This server
    is expected to be running the WebDriver wire protocol as defined at
    https://www.selenium.dev/documentation/legacy/json_wire_protocol/.

    Attributes:
    -----------
    session_id - String ID of the browser session started and controlled by this WebDriver.
    capabilities - Dictionary of effective capabilities of this browser session as returned
        by the remote server. See https://www.selenium.dev/documentation/legacy/desired_capabilities/
    command_executor : str or remote_connection.RemoteConnection object used to execute commands.
    error_handler - errorhandler.ErrorHandler object used to handle errors.
    NrH   rI   Úfile_detectorre   Úlocator_converterÚweb_element_clsrK   rL   c                 óö  — |€t        d«      ‚t        |t        «      rt        |«      }d}	n|j	                  «       }|j
                  }	|| _        t        | j                  t        t        f«      rt        ||||	|¬«      | _        d| _
        d| _        i | _        i | _        t        «       | _        t!        | «      | _        t%        | «      | _        |xs
 t)        «       | _        |xs
 t-        «       | _        |xs | j0                  | _        d| _        | j5                  «        | j7                  |«       t9        | «      | _        d| _        d| _        d| _         d| _!        d| _"        d| _#        d| _$        d| _%        y)af  Create a new driver that will issue commands using the wire
        protocol.

        Parameters:
        -----------
        command_executor : str or remote_connection.RemoteConnection
            - Either a string representing the URL of the remote server or a custom
            remote_connection.RemoteConnection object. Defaults to 'http://127.0.0.1:4444/wd/hub'.
        keep_alive : bool (Deprecated)
            - Whether to configure remote_connection.RemoteConnection to use HTTP keep-alive. Defaults to True.
        file_detector : object or None
            - Pass a custom file detector object during instantiation. If None, the default
                LocalFileDetector() will be used.
        options : options.Options
            - Instance of a driver options.Options class.
        locator_converter : object or None
            - Custom locator converter to use. Defaults to None.
        web_element_cls : class
            - Custom class to use for web elements. Defaults to WebElement.
        client_config : object or None
            - Custom client configuration to use. Defaults to None.
        Nz`missing 1 required keyword-only argument: 'options' (instance of driver `options.Options` class)F)rH   rI   rJ   rK   T)&Ú	TypeErrorr[   Úlistrv   rh   Ú_ignore_local_proxyrH   r\   Úbytesrd   Ú
_is_remoteÚ
session_idrC   Úpinned_scriptsr*   Úerror_handlerr3   Ú
_switch_tor/   Ú_mobiler-   r€   r.   r�   Ú_web_element_clsÚ_authenticator_idÚstart_clientÚstart_sessionr+   Ú_fedcmÚ_websocket_connectionÚ_scriptÚ_networkÚ_browserÚ_bidi_sessionÚ_browsing_contextÚ_storageÚ_webextension)
ÚselfrH   rI   r€   re   r�   r‚   rK   r=   r†   s
             r:   Ú__init__zWebDriver.__init__Á   se  € ðB ˆ?ÜØróð ô ˜¤Ô&Ü)¨'Ó2ˆLØ"'Ñà"×2Ñ2Ó4ˆLØ")×"=Ñ"=ÐØ 0ˆÔÜ�d×+Ñ+¬c´5¨\Ô:Ü$9ØØ!1Ø%Ø#6Ø+ô%ˆDÔ!ð ˆŒØˆŒØˆŒ	Ø ˆÔÜ)›^ˆÔÜ" 4›.ˆŒÜ˜d“|ˆŒØ*ÒAÔ.?Ó.AˆÔØ!2Ò!HÔ6FÓ6HˆÔØ /Ò H°4×3HÑ3HˆÔØ!%ˆÔØ×ÑÔØ×Ñ˜<Ô(Ü˜D“kˆŒà%)ˆÔ"ØˆŒØˆŒØˆŒØ!ˆÔØ!%ˆÔØˆŒØ!ˆÕr9   c                 óz   — dt        | «      j                  › dt        | «      j                  › d| j                  › d�S )Nú<ú.z (session="z")>)Útyperz   ry   r‰   ©r›   s    r:   Ú__repr__zWebDriver.__repr__  s9   € Ø”4˜“:×(Ñ(Ð)¨¬4°«:×+>Ñ+>Ð*?¸{È4Ï?É?ÐJ[Ð[^Ð_Ð_r9   c                 ó   — | S ©Nr8   r¡   s    r:   Ú	__enter__zWebDriver.__enter__  s   € Øˆr9   Úexc_typeÚexcÚ	tracebackc                 ó$   — | j                  «        y r¤   )Úquit)r›   r¦   r§   r¨   s       r:   Ú__exit__zWebDriver.__exit__  s   € ð 	�	‰	�r9   c              /   óª   K  — d}t        | j                  |«      s| j                  } ||i |¤Ž| _        	 d–— |r|| _        yy# |r|| _        w w xY w­w)aA  Overrides the current file detector (if necessary) in limited
        context. Ensures the original file detector is set afterwards.

        Parameters:
        -----------
        file_detector_class : object
            - Class of the desired file detector. If the class is different
            from the current file_detector, then the class is instantiated with args and kwargs
            and used as a file detector during the duration of the context manager.
        args : tuple
            - Optional arguments that get passed to the file detector class during instantiation.
        kwargs : dict
            - Keyword arguments, passed the same way as args.

        Example:
        --------
        >>> with webdriver.file_detector_context(UselessFileDetector):
        >>>    someinput.send_keys('/etc/hosts')
        N)r[   r€   )r›   Úfile_detector_classÚargsÚkwargsÚlast_detectors        r:   Úfile_detector_contextzWebDriver.file_detector_context  sc   è ø€ ð* ˆÜ˜$×,Ñ,Ð.AÔBØ ×.Ñ.ˆMÙ!4°dÐ!E¸fÑ!EˆDÔð	3ÛáØ%2�Õ"ð ø‰}Ø%2�Õ"ð üs   ‚2AµA ¹AÁAÁAc                 ó   — | j                   S r¤   )r�   r¡   s    r:   ÚmobilezWebDriver.mobile:  s   € à�|‰|Ðr9   c                 óR   — d| j                   v r| j                   d   S t        d«      ‚)zˆReturns the name of the underlying browser for this instance.

        Example:
        --------
        >>> name = driver.name
        rT   z1browserName not specified in session capabilities)rC   ÚKeyErrorr¡   s    r:   ÚnamezWebDriver.name>  s+   € ð ˜DŸI™IÑ%Ø—9‘9˜]Ñ+Ð+ÜÐJÓKÐKr9   c                  ó   — y)zxCalled before starting a new session.

        This method may be overridden to define custom startup behavior.
        Nr8   r¡   s    r:   r�   zWebDriver.start_clientJ  s   € ð
 	r9   c                  ó   — y)z‚Called after executing a quit command.

        This method may be overridden to define custom shutdown
        behavior.
        Nr8   r¡   s    r:   Ústop_clientzWebDriver.stop_clientQ  s   € ð 	r9   r=   c                 ó:  — t        |«      }	 | j                  t        j                  |«      d   }|j	                  d«      | _        |j	                  d«      | _        y# t        $ r4 t        | d«      r&| j                  �| j                  j                  «        ‚ w xY w)z¿Creates a new session with the desired capabilities.

        Parameters:
        -----------
        capabilities : dict
            - A capabilities dict to start the session with.
        ÚvalueÚ	sessionIdr=   ÚserviceN)rG   Úexecuter)   ÚNEW_SESSIONrV   r‰   rC   Ú	ExceptionÚhasattrr½   Ústop)r›   r=   rC   Úresponses       r:   r‘   zWebDriver.start_sessionY  sƒ   € ô ˜LÓ)ˆð	Ø—|‘|¤G×$7Ñ$7¸Ó>¸wÑGˆHØ&Ÿl™l¨;Ó7ˆDŒOØ Ÿ™ ^Ó4ˆD�IøÜò 	Ü�t˜YÔ'¨D¯L©LÐ,DØ—‘×!Ñ!Ô#Øð	ús   �AA Á=Bc                 ó`  ‡ — t        |t        «      r0i }|j                  «       D ]  \  }}‰ j                  |«      ||<   Œ |S t        |‰ j                  «      rd|j
                  iS t        |‰ j                  «      rd|j
                  iS t        |t        «      rt        ˆ fd„|D «       «      S |S )Nú#element-6066-11e4-a52e-4f735466cecfú"shadow-6066-11e4-a52e-4f735466cecfc              3   ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wr¤   )Ú_wrap_value©rW   Úitemr›   s     €r:   rY   z(WebDriver._wrap_value.<locals>.<genexpr>w  s   øè ø€ ÒA°4˜×(Ñ(¨×.ÑAùó   ƒ)r[   ÚdictrB   rÈ   rŽ   ÚidÚ_shadowroot_clsr…   )r›   r»   Ú	convertedÚkeyÚvals   `    r:   rÈ   zWebDriver._wrap_valuel  s£   ø€ Ü�eœTÔ"ØˆIØ!ŸK™K›Mò 7‘��SØ!%×!1Ñ!1°#Ó!6�	˜#’ð7àÐÜ�e˜T×2Ñ2Ô3Ø9¸5¿8¹8ÐDÐDÜ�e˜T×1Ñ1Ô2Ø8¸%¿(¹(ÐCÐCÜ�eœTÔ"ÜÓA¸5ÔAÓAÐAØˆr9   Ú
element_idc                 ó&   — | j                  | |«      S )z6Creates a web element with the specified `element_id`.)rŽ   )r›   rÒ   s     r:   Úcreate_web_elementzWebDriver.create_web_elementz  s   € à×$Ñ$ T¨:Ó6Ð6r9   c                 ó.  ‡ — t        |t        «      r_d|v r‰ j                  |d   «      S d|v r‰ j                  ‰ |d   «      S |j	                  «       D ]  \  }}‰ j                  |«      ||<   Œ |S t        |t        «      rt        ˆ fd„|D «       «      S |S )NrÅ   rÆ   c              3   ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wr¤   )Ú_unwrap_valuerÉ   s     €r:   rY   z*WebDriver._unwrap_value.<locals>.<genexpr>ˆ  s   øè ø€ ÒC°T˜×*Ñ*¨4×0ÑCùrË   )r[   rÌ   rÔ   rÎ   rB   r×   r…   )r›   r»   rÐ   rÑ   s   `   r:   r×   zWebDriver._unwrap_value~  sŸ   ø€ Ü�eœTÔ"Ø4¸Ñ=Ø×.Ñ.¨uÐ5ZÑ/[Ó\Ð\Ø3°uÑ<Ø×+Ñ+¨D°%Ð8\Ñ2]Ó^Ð^Ø!ŸK™K›Mò 5‘��SØ!×/Ñ/°Ó4��c’
ð5àˆLÜ�eœTÔ"ÜÓC¸UÔCÓCÐCØˆr9   ÚcmdÚcmd_argsc                 ó2   — | j                  d||dœ«      d   S )aý  Execute Chrome Devtools Protocol command and get returned result The
        command and command args should follow chrome devtools protocol
        domains/commands, refer to link
        https://chromedevtools.github.io/devtools-protocol/

        Parameters:
        -----------
        cmd : str,
            - Command name

        cmd_args : dict
            - Command args
            - Empty dict {} if there is no command args

        Returns:
        --------
            A dict, empty dict {} if there is no result to return.
                - To getResponseBody: {'base64Encoded': False, 'body': 'response body string'}

        Example:
        --------
        >>> driver.execute_cdp_cmd("Network.getResponseBody", {"requestId": requestId})

        ÚexecuteCdpCommand)rØ   Úparamsr»   )r¾   )r›   rØ   rÙ   s      r:   Úexecute_cdp_cmdzWebDriver.execute_cdp_cmd‹  s!   € ð2 �|‰|Ð/¸ÈÑ1QÓRÐSZÑ[Ð[r9   Údriver_commandrÜ   c                 ób  — | j                  |«      }| j                  r$|sd| j                  i}nd|vr| j                  |d<   | j                  j                  ||«      }|rA| j                  j                  |«       | j                  |j                  dd«      «      |d<   |S dd| j                  dœS )aš  Sends a command to be executed by a command.CommandExecutor.

        Parameters:
        -----------
        driver_command : str
            - The name of the command to execute as a string.

        params : dict
            - A dictionary of named Parameters to send with the command.

        Returns:
        --------
          dict - The command's JSON response loaded into a dictionary object.
        r¼   r»   Nr   )Úsuccessr»   r¼   )rÈ   r‰   rH   r¾   r‹   Úcheck_responser×   rV   )r›   rÞ   rÜ   rÃ   s       r:   r¾   zWebDriver.execute¦  s©   € ð ×!Ñ! &Ó)ˆà�?Š?ÙØ% t§¡Ð7‘Ø FÑ*Ø&*§o¡o��{Ñ#à×(Ñ(×0Ñ0°ÀÓHˆÙØ×Ñ×-Ñ-¨hÔ7Ø $× 2Ñ 2°8·<±<ÀÈÓ3NÓ OˆH�WÑØˆOð  t¸$¿/¹/ÑJÐJr9   Úurlc                 óH   — | j                  t        j                  d|i«       y)að  Navigate the browser to the specified URL in the current window or
        tab.

        The method does not return until the page is fully loaded (i.e. the
        onload event has fired).

        Parameters:
        -----------
        url : str
            - The URL to be opened by the browser.
            - Must include the protocol (e.g., http://, https://).

        Example:
        --------
        >>> driver = webdriver.Chrome()
        >>> driver.get("https://example.com")
        râ   N)r¾   r)   ÚGET)r›   râ   s     r:   rV   zWebDriver.getÆ  s   € ð$ 	�‰”W—[‘[ 5¨# ,Õ/r9   c                 ó`   — | j                  t        j                  «      j                  dd«      S )z­Returns the title of the current page.

        Example:
        --------
        >>> element = driver.find_element(By.ID, "foo")
        >>> print(element.title())
        r»   Ú )r¾   r)   Ú	GET_TITLErV   r¡   s    r:   ÚtitlezWebDriver.titleÚ  s&   € ð �|‰|œG×-Ñ-Ó.×2Ñ2°7¸BÓ?Ð?r9   Úscriptc                 óN   — t        |«      }|| j                  |j                  <   |S )zÄStore common javascript scripts to be executed later by a unique
        hashable ID.

        Example:
        --------
        >>> script = "return document.getElementById('foo').value"
        )r1   rŠ   rÍ   )r›   ré   Ú
script_keyÚscript_key_instances       r:   Ú
pin_scriptzWebDriver.pin_scriptå  s,   € ô (¨
Ó3ÐØ6<ˆ×ÑÐ/×2Ñ2Ñ3Ø"Ð"r9   rë   c                 ó¢   — 	 | j                   j                  |j                  «       y# t        $ r t        d|› d| j                   › �«      d‚w xY w)zuRemove a pinned script from storage.

        Example:
        --------
        >>> driver.unpin(script_key)
        zNo script with key: z existed in N)rŠ   ÚpoprÍ   rµ   )r›   rë   s     r:   ÚunpinzWebDriver.unpinñ  sT   € ð	kØ×Ñ×#Ñ# J§M¡MÕ2øÜò 	kÜÐ1°*°¸\È$×J]ÑJ]ÐI^Ð_Ó`ÐfjÐjð	kús	   ‚%( ¨&Ac                 ó,   — t        | j                  «      S )z‰Return a list of all pinned scripts.

        Example:
        --------
        >>> pinned_scripts = driver.get_pinned_scripts()
        )r…   rŠ   r¡   s    r:   Úget_pinned_scriptszWebDriver.get_pinned_scriptsý  s   € ô �D×'Ñ'Ó(Ð(r9   c                 óì   — t        |t        «      r	 | j                  |j                     }t        |«      }t        j                  }| j                  |||dœ«      d   S # t        $ r t        d«      ‚w xY w)aä  Synchronously Executes JavaScript in the current window/frame.

        Parameters:
        -----------
        script : str
            - The javascript to execute.

        *args : tuple
            - Any applicable arguments for your JavaScript.

        Example:
        --------
        >>> input_id = "username"
        >>> input_value = "test_user"
        >>> driver.execute_script("document.getElementById(arguments[0]).value = arguments[1];", input_id, input_value)
        z Pinned script could not be found©ré   r®   r»   )
r[   r1   rŠ   rÍ   rµ   r   r…   r)   ÚW3C_EXECUTE_SCRIPTr¾   ©r›   ré   r®   Úconverted_argsÚcommands        r:   Úexecute_scriptzWebDriver.execute_script  sy   € ô" �fœiÔ(ðNØ×,Ñ,¨V¯Y©YÑ7�ô ˜d›ˆÜ×,Ñ,ˆà�|‰|˜G°ÀÑ%OÓPÐQXÑYÐYøô ò NÜ)Ð*LÓMÐMðNús   ’A ÁA3c                 óh   — t        |«      }t        j                  }| j                  |||dœ«      d   S )aë  Asynchronously Executes JavaScript in the current window/frame.

        Parameters:
        -----------
        script : str
            - The javascript to execute.

        *args : tuple
            - Any applicable arguments for your JavaScript.

        Example:
        --------
        >>> script = "var callback = arguments[arguments.length - 1]; "
        ...     "window.setTimeout(function(){ callback('timeout') }, 3000);"
        >>> driver.execute_async_script(script)
        rô   r»   )r…   r)   ÚW3C_EXECUTE_SCRIPT_ASYNCr¾   rö   s        r:   Úexecute_async_scriptzWebDriver.execute_async_script"  s4   € ô" ˜d›ˆÜ×2Ñ2ˆà�|‰|˜G°ÀÑ%OÓPÐQXÑYÐYr9   c                 óF   — | j                  t        j                  «      d   S )zsGets the URL of the current page.

        Example:
        --------
        >>> print(driver.current_url)
        r»   )r¾   r)   ÚGET_CURRENT_URLr¡   s    r:   Úcurrent_urlzWebDriver.current_url8  ó   € ð �|‰|œG×3Ñ3Ó4°WÑ=Ð=r9   c                 óF   — | j                  t        j                  «      d   S )zvGets the source of the current page.

        Example:
        --------
        >>> print(driver.page_source)
        r»   )r¾   r)   ÚGET_PAGE_SOURCEr¡   s    r:   Úpage_sourcezWebDriver.page_sourceB  r   r9   c                 óB   — | j                  t        j                  «       y)zaCloses the current window.

        Example:
        --------
        >>> driver.close()
        N)r¾   r)   ÚCLOSEr¡   s    r:   ÚclosezWebDriver.closeL  s   € ð 	�‰”W—]‘]Õ#r9   c                 óö   — 	 | j                  t        j                  «       | j                  «        | j                  j                  «        y# | j                  «        | j                  j                  «        w xY w)zzQuits the driver and closes every associated window.

        Example:
        --------
        >>> driver.quit()
        N)r¾   r)   ÚQUITr¹   rH   r  r¡   s    r:   rª   zWebDriver.quitU  sW   € ð	*Ø�L‰LœŸ™Ô&à×ÑÔØ×!Ñ!×'Ñ'Õ)øð ×ÑÔØ×!Ñ!×'Ñ'Õ)ús   ‚A Á,A8c                 óF   — | j                  t        j                  «      d   S )z…Returns the handle of the current window.

        Example:
        --------
        >>> print(driver.current_window_handle)
        r»   )r¾   r)   ÚW3C_GET_CURRENT_WINDOW_HANDLEr¡   s    r:   Úcurrent_window_handlezWebDriver.current_window_handleb  s   € ð �|‰|œG×AÑAÓBÀ7ÑKÐKr9   c                 óF   — | j                  t        j                  «      d   S )z“Returns the handles of all windows within the current session.

        Example:
        --------
        >>> print(driver.window_handles)
        r»   )r¾   r)   ÚW3C_GET_WINDOW_HANDLESr¡   s    r:   Úwindow_handleszWebDriver.window_handlesl  ó   € ð �|‰|œG×:Ñ:Ó;¸GÑDÐDr9   c                 óH   — t         j                  }| j                  |d«       y)z†Maximizes the current window that webdriver is using.

        Example:
        --------
        >>> driver.maximize_window()
        N)r)   ÚW3C_MAXIMIZE_WINDOWr¾   )r›   rø   s     r:   Úmaximize_windowzWebDriver.maximize_windowv  s   € ô ×-Ñ-ˆØ�‰�W˜dÕ#r9   c                 óB   — | j                  t        j                  «       y)z�Invokes the window manager-specific 'full screen' operation.

        Example:
        --------
        >>> driver.fullscreen_window()
        N)r¾   r)   ÚFULLSCREEN_WINDOWr¡   s    r:   Úfullscreen_windowzWebDriver.fullscreen_window€  s   € ð 	�‰”W×.Ñ.Õ/r9   c                 óB   — | j                  t        j                  «       y)z9Invokes the window manager-specific 'minimize' operation.N)r¾   r)   ÚMINIMIZE_WINDOWr¡   s    r:   Úminimize_windowzWebDriver.minimize_window‰  s   € à�‰”W×,Ñ,Õ-r9   Úprint_optionsc                 óp   — i }|r|j                  «       }| j                  t        j                  |«      d   S )zÌTakes PDF of the current page.

        The driver makes a best effort to return a PDF based on the
        provided Parameters.

        Example:
        --------
        >>> driver.print_page()
        r»   )Úto_dictr¾   r)   Ú
PRINT_PAGE)r›   r  re   s      r:   Ú
print_pagezWebDriver.print_page�  s6   € ð ˆÙØ#×+Ñ+Ó-ˆGà�|‰|œG×.Ñ.°Ó8¸ÑAÐAr9   c                 ó   — | j                   S )ah  Return an object containing all options to switch focus into.

        Returns:
        --------
        SwitchTo: an object containing all options to switch focus into.

        Examples:
        --------
        >>> element = driver.switch_to.active_element
        >>> alert = driver.switch_to.alert
        >>> driver.switch_to.default_content()
        >>> driver.switch_to.frame("frame_name")
        >>> driver.switch_to.frame(1)
        >>> driver.switch_to.frame(driver.find_elements(By.TAG_NAME, "iframe")[0])
        >>> driver.switch_to.parent_frame()
        >>> driver.switch_to.window("main")
        )rŒ   r¡   s    r:   Ú	switch_tozWebDriver.switch_to�  s   € ð& �‰Ðr9   c                 óB   — | j                  t        j                  «       y)ztGoes one step backward in the browser history.

        Example:
        --------
        >>> driver.back()
        N)r¾   r)   ÚGO_BACKr¡   s    r:   ÚbackzWebDriver.back³  ó   € ð 	�‰”W—_‘_Õ%r9   c                 óB   — | j                  t        j                  «       y)zvGoes one step forward in the browser history.

        Example:
        --------
        >>> driver.forward()
        N)r¾   r)   Ú
GO_FORWARDr¡   s    r:   ÚforwardzWebDriver.forward¼  s   € ð 	�‰”W×'Ñ'Õ(r9   c                 óB   — | j                  t        j                  «       y)zdRefreshes the current page.

        Example:
        --------
        >>> driver.refresh()
        N)r¾   r)   ÚREFRESHr¡   s    r:   ÚrefreshzWebDriver.refreshÅ  r#  r9   c                 óF   — | j                  t        j                  «      d   S )a>  Returns a set of dictionaries, corresponding to cookies visible in
        the current session.

        Returns:
        --------
        cookies:List[dict] : A list of dictionaries, corresponding to cookies visible in the current

        Example:
        --------
        >>> cookies = driver.get_cookies()
        r»   )r¾   r)   ÚGET_ALL_COOKIESr¡   s    r:   Úget_cookieszWebDriver.get_cookiesÏ  s   € ð �|‰|œG×3Ñ3Ó4°WÑ=Ð=r9   c                 óä   — |r|j                  «       rt        d«      ‚t        j                  t        «      5  | j                  t        j                  d|i«      d   cddd«       S # 1 sw Y   yxY w)zäGet a single cookie by name. Raises ValueError if the name is empty
        or whitespace. Returns the cookie if found, None if not.

        Example:
        --------
        >>> cookie = driver.get_cookie("my_cookie")
        úCookie name cannot be emptyr¶   r»   N)ÚisspaceÚ
ValueErrorÚ
contextlibÚsuppressr   r¾   r)   Ú
GET_COOKIE©r›   r¶   s     r:   Ú
get_cookiezWebDriver.get_cookieÝ  se   € ñ �t—|‘|”~ÜÐ:Ó;Ð;ä× Ñ Ô!6Ó7ñ 	MØ—<‘<¤× 2Ñ 2°V¸T°NÓCÀGÑL÷	M÷ 	Mñ 	Mð ús   ·%A&Á&A/c                 ó‚   — |r|j                  «       rt        d«      ‚| j                  t        j                  d|i«       y)zÄDeletes a single cookie with the given name. Raises ValueError if
        the name is empty or whitespace.

        Example:
        --------
        >>> driver.delete_cookie("my_cookie")
        r.  r¶   N)r/  r0  r¾   r)   ÚDELETE_COOKIEr4  s     r:   Údelete_cookiezWebDriver.delete_cookieí  s3   € ñ �t—|‘|”~ÜÐ:Ó;Ð;à�‰”W×*Ñ*¨V°T¨NÕ;r9   c                 óB   — | j                  t        j                  «       y)zƒDelete all cookies in the scope of the session.

        Example:
        --------
        >>> driver.delete_all_cookies()
        N)r¾   r)   ÚDELETE_ALL_COOKIESr¡   s    r:   Údelete_all_cookieszWebDriver.delete_all_cookiesü  s   € ð 	�‰”W×/Ñ/Õ0r9   c                 ó¨   — d|v r,|d   dv sJ ‚| j                  t        j                  d|i«       y| j                  t        j                  d|i«       y)az  Adds a cookie to your current session.

        Parameters:
        -----------
        cookie_dict : dict
            - A dictionary object, with required keys - "name" and "value";
            - Optional keys - "path", "domain", "secure", "httpOnly", "expiry", "sameSite"

        Examples:
        --------
        >>> driver.add_cookie({"name": "foo", "value": "bar"})
        >>> driver.add_cookie({"name": "foo", "value": "bar", "path": "/"})
        >>> driver.add_cookie({"name": "foo", "value": "bar", "path": "/", "secure": True})
        >>> driver.add_cookie({"name": "foo", "value": "bar", "sameSite": "Strict"})
        ÚsameSite)ÚStrictÚLaxÚNoneÚcookieN)r¾   r)   Ú
ADD_COOKIE)r›   Úcookie_dicts     r:   Ú
add_cookiezWebDriver.add_cookie  sR   € ð  ˜Ñ$Ø˜zÑ*Ð.GÑGÐGÐGØ�L‰Lœ×+Ñ+¨h¸Ð-DÕEà�L‰Lœ×+Ñ+¨h¸Ð-DÕEr9   Útime_to_waitc           	      ór   — | j                  t        j                  dt        t	        |«      dz  «      i«       y)aÉ  Sets a sticky timeout to implicitly wait for an element to be found,
        or a command to complete. This method only needs to be called one time
        per session. To set the timeout for calls to execute_async_script, see
        set_script_timeout.

        Parameters:
        -----------
        time_to_wait : float
            - Amount of time to wait (in seconds)

        Example:
        --------
        >>> driver.implicitly_wait(30)
        Úimplicitéè  N©r¾   r)   ÚSET_TIMEOUTSÚintÚfloat©r›   rE  s     r:   Úimplicitly_waitzWebDriver.implicitly_wait  s-   € ð 	�‰”W×)Ñ)¨J¼¼EÀ,Ó<OÐRVÑ<VÓ8WÐ+XÕYr9   c           	      ór   — | j                  t        j                  dt        t	        |«      dz  «      i«       y)aJ  Set the amount of time that the script should wait during an
        execute_async_script call before throwing an error.

        Parameters:
        -----------
        time_to_wait : float
            - The amount of time to wait (in seconds)

        Example:
        --------
        >>> driver.set_script_timeout(30)
        ré   rH  NrI  rM  s     r:   Úset_script_timeoutzWebDriver.set_script_timeout-  s-   € ð 	�‰”W×)Ñ)¨H´c¼%ÀÓ:MÐPTÑ:TÓ6UÐ+VÕWr9   c           	      óð   — 	 | j                  t        j                  dt        t	        |«      dz  «      i«       y# t
        $ r2 | j                  t        j                  t	        |«      dz  ddœ«       Y yw xY w)a2  Set the amount of time to wait for a page load to complete before
        throwing an error.

        Parameters:
        -----------
        time_to_wait : float
             - The amount of time to wait (in seconds)

        Example:
        --------
        >>> driver.set_page_load_timeout(30)
        ÚpageLoadrH  z	page load)Úmsr    N)r¾   r)   rJ  rK  rL  r   rM  s     r:   Úset_page_load_timeoutzWebDriver.set_page_load_timeout<  sf   € ð	hØ�L‰Lœ×-Ñ-°
¼CÄÀlÓ@SÐVZÑ@ZÓ<[Ð/\Õ]øÜ!ò 	hØ�L‰Lœ×-Ñ-´e¸LÓ6IÈDÑ6PÐZeÑ/fÖgð	hús   ‚7: º8A5Á4A5c                 óæ   — | j                  t        j                  «      d   }|j                  d«      dz  |d<   |j                  d«      dz  |d<   |j                  d«      dz  |d<   t	        di |¤ŽS )	aª  Get all the timeouts that have been set on the current session.

        Returns:
        --------
        Timeouts: A named tuple with the following fields:
            - implicit_wait: The time to wait for elements to be found.
            - page_load: The time to wait for a page to load.
            - script: The time to wait for scripts to execute.

        Example:
        --------
        >>> driver.timeouts
        r»   rG  rH  Úimplicit_waitrR  Ú	page_loadré   r8   )r¾   r)   ÚGET_TIMEOUTSrï   r   )r›   Útimeoutss     r:   rY  zWebDriver.timeoutsN  ss   € ð —<‘<¤× 4Ñ 4Ó5°gÑ>ˆØ$,§L¡L°Ó$<¸tÑ$Cˆ�Ñ!Ø (§¡¨ZÓ 8¸4Ñ ?ˆ�ÑØ%Ÿ\™\¨(Ó3°dÑ:ˆ�ÑÜÑ#˜(Ñ#Ð#r9   c                 óf   — | j                  t        j                  |j                  «       «      d   }y)zÿSet all timeouts for the session. This will override any previously
        set timeouts.

        Example:
        --------
        >>> my_timeouts = Timeouts()
        >>> my_timeouts.implicit_wait = 10
        >>> driver.timeouts = my_timeouts
        r»   N)r¾   r)   rJ  Ú_to_json)r›   rY  Ú_s      r:   rY  zWebDriver.timeoutsc  s(   € ð �L‰Lœ×-Ñ-¨x×/@Ñ/@Ó/BÓCÀGÑL‰r9   r»   c                 ó  — | j                   j                  ||«      \  }}t        |t        «      r2| j	                  ||¬«      }|st        d|j                  › �«      ‚|d   S | j                  t        j                  ||dœ«      d   S )aõ  Find an element given a By strategy and locator.

        Parameters:
        -----------
        by : selenium.webdriver.common.by.By
            The locating strategy to use. Default is `By.ID`. Supported values include:
            - By.ID: Locate by element ID.
            - By.NAME: Locate by the `name` attribute.
            - By.XPATH: Locate by an XPath expression.
            - By.CSS_SELECTOR: Locate by a CSS selector.
            - By.CLASS_NAME: Locate by the `class` attribute.
            - By.TAG_NAME: Locate by the tag name (e.g., "input", "button").
            - By.LINK_TEXT: Locate a link element by its exact text.
            - By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
            - RelativeBy: Locate elements relative to a specified root element.

        Example:
        --------
        element = driver.find_element(By.ID, 'foo')

        Returns:
        -------
        WebElement
            The first matching `WebElement` found on the page.
        )Úbyr»   z%Cannot locate relative element with: r   ©Úusingr»   r»   )
r�   Úconvertr[   r#   Úfind_elementsr   Úrootr¾   r)   ÚFIND_ELEMENT)r›   r^  r»   Úelementss       r:   Úfind_elementzWebDriver.find_elementp  s‰   € ð4 ×*Ñ*×2Ñ2°2°uÓ=‰	ˆˆEä�bœ*Ô%Ø×)Ñ)¨R°uÐ)Ó=ˆHÙÜ,Ð/TÐUW×U\ÑU\ÐT]Ð-^Ó_Ð_Ø˜A‘;Ðà�|‰|œG×0Ñ0¸BÈÑ2OÓPÐQXÑYÐYr9   c                 ó˜  — | j                   j                  ||«      \  }}t        |t        «      rrdj	                  t
        j                  d«      dd «      }t        j                  |d«      j                  d«      }d|› d�}| j                  ||j                  «       «      S | j                  t        j                  ||dœ«      d	   xs g S )
a
  Find elements given a By strategy and locator.

        Parameters:
        -----------
        by : selenium.webdriver.common.by.By
            The locating strategy to use. Default is `By.ID`. Supported values include:
            - By.ID: Locate by element ID.
            - By.NAME: Locate by the `name` attribute.
            - By.XPATH: Locate by an XPath expression.
            - By.CSS_SELECTOR: Locate by a CSS selector.
            - By.CLASS_NAME: Locate by the `class` attribute.
            - By.TAG_NAME: Locate by the tag name (e.g., "input", "button").
            - By.LINK_TEXT: Locate a link element by its exact text.
            - By.PARTIAL_LINK_TEXT: Locate a link element by partial text match.
            - RelativeBy: Locate elements relative to a specified root element.

        Example:
        --------
        element = driver.find_elements(By.ID, 'foo')

        Returns:
        -------
        List[WebElement]
            list of `WebElements` matching locator strategy found on the page.
        rŸ   NéÿÿÿÿzfindElements.jsÚutf8z/* findElements */return (z).apply(null, arguments);r_  r»   )r�   ra  r[   r#   Újoinry   ÚsplitÚpkgutilÚget_dataÚdecoderù   r  r¾   r)   ÚFIND_ELEMENTS)r›   r^  r»   Ú_pkgÚraw_functionÚfind_element_jss         r:   rb  zWebDriver.find_elements”  s¸   € ð4 ×*Ñ*×2Ñ2°2°uÓ=‰	ˆˆEä�bœ*Ô%Ø—8‘8œHŸN™N¨3Ó/°°Ð4Ó5ˆDÜ"×+Ñ+¨DÐ2CÓD×KÑKÈFÓSˆLØ :¸<¸.ÐHaÐbˆOØ×&Ñ& ¸¿
¹
»ÓEÐEð �|‰|œG×1Ñ1¸RÈ%Ñ3PÓQÐRYÑZÒ`Ð^`Ð`r9   c                 ó   — | j                   S )z‡Returns the drivers current capabilities being used.

        Example:
        --------
        >>> print(driver.capabilities)
        )rC   r¡   s    r:   r=   zWebDriver.capabilitiesº  s   € ð �y‰yÐr9   c                 ó@  — t        |«      j                  «       j                  d«      st        j                  dt
        d¬«       | j                  «       }	 t        |d«      5 }|j                  |«       ddd«       ~y# 1 sw Y   ŒxY w# t        $ r Y ~yw xY w# ~w xY w)	aÎ  Saves a screenshot of the current window to a PNG image file.
        Returns False if there is any IOError, else returns True. Use full
        paths in your filename.

        Parameters:
        -----------
        filename : str
            - The full path you wish to save your screenshot to. This
            - should end with a `.png` extension.

        Example:
        --------
        >>> driver.get_screenshot_as_file("/Screenshots/foo.png")
        z.pngz^name used for saved screenshot does not match file type. It should end with a `.png` extensionr$   ©Ú
stacklevelÚwbNFT)
r\   ÚlowerÚendswithÚwarningsÚwarnÚUserWarningÚget_screenshot_as_pngÚopenÚwriteÚOSError)r›   ÚfilenameÚpngÚfs       r:   Úget_screenshot_as_filez WebDriver.get_screenshot_as_fileÄ  s—   € ô �8‹}×"Ñ"Ó$×-Ñ-¨fÔ5Ü�M‰MØpÜØõð
 ×(Ñ(Ó*ˆð	Ü�h Ó%ð ¨Ø—‘˜”÷ð
 Ø÷ð ûäò 	Øáð	ûñ ús<   ÁB
 Á"A>Á4B
 Á>BÂB
 Â
	BÂB ÂBÂB ÂBc                 ó$   — | j                  |«      S )aÇ  Saves a screenshot of the current window to a PNG image file.
        Returns False if there is any IOError, else returns True. Use full
        paths in your filename.

        Parameters:
        -----------
        filename : str
            - The full path you wish to save your screenshot to. This
            - should end with a `.png` extension.

        Example:
        --------
        >>> driver.save_screenshot("/Screenshots/foo.png")
        )r„  )r›   r�  s     r:   Úsave_screenshotzWebDriver.save_screenshotã  s   € ð ×*Ñ*¨8Ó4Ð4r9   c                 óR   — t        | j                  «       j                  d«      «      S )z’Gets the screenshot of the current window as a binary data.

        Example:
        --------
        >>> driver.get_screenshot_as_png()
        Úascii)r   Úget_screenshot_as_base64Úencoder¡   s    r:   r}  zWebDriver.get_screenshot_as_pngô  s#   € ô ˜×6Ñ6Ó8×?Ñ?ÀÓHÓIÐIr9   c                 óF   — | j                  t        j                  «      d   S )zÒGets the screenshot of the current window as a base64 encoded string
        which is useful in embedded images in HTML.

        Example:
        --------
        >>> driver.get_screenshot_as_base64()
        r»   )r¾   r)   Ú
SCREENSHOTr¡   s    r:   r‰  z"WebDriver.get_screenshot_as_base64ý  s   € ð �|‰|œG×.Ñ.Ó/°Ñ8Ð8r9   ÚwindowHandlec                 óp   — | j                  |«       | j                  t        |«      t        |«      ¬«       y)a]  Sets the width and height of the current window. (window.resizeTo)

        Parameters:
        -----------
        width : int
            - the width in pixels to set the window to

        height : int
            - the height in pixels to set the window to

        Example:
        --------
        >>> driver.set_window_size(800, 600)
        ©ÚwidthÚheightN©Ú"_check_if_window_handle_is_currentÚset_window_rectrK  )r›   r�  r‘  r�  s       r:   Úset_window_sizezWebDriver.set_window_size  s-   € ð 	×/Ñ/°Ô=Ø×Ñ¤3 u£:´c¸&³kÐÕBr9   c                 ó¤   — | j                  |«       | j                  «       }|j                  dd«      r|d   }dD �ci c]  }|||   “Œ
 c}S c c}w )z�Gets the width and height of the current window.

        Example:
        --------
        >>> driver.get_window_size()
        r»   Nr�  )r“  Úget_window_rectrV   )r›   r�  ÚsizerE   s       r:   Úget_window_sizezWebDriver.get_window_size  sS   € ð 	×/Ñ/°Ô=Ø×#Ñ#Ó%ˆà�8‰8�G˜TÔ"Ø˜‘=ˆDà$7Ö8˜q��4˜‘7‘
Ò8Ð8ùÒ8s   ½AÚxÚyc                 ón   — | j                  |«       | j                  t        |«      t        |«      ¬«      S )ai  Sets the x,y position of the current window. (window.moveTo)

        Parameters:
        ---------
        x : float
            - The x-coordinate in pixels to set the window position

        y : float
            - The y-coordinate in pixels to set the window position

        Example:
        --------
        >>> driver.set_window_position(0, 0)
        ©rš  r›  r’  )r›   rš  r›  r�  s       r:   Úset_window_positionzWebDriver.set_window_position)  s0   € ð 	×/Ñ/°Ô=Ø×#Ñ#¤c¨!£f´°A³Ð#Ó7Ð7r9   c                 óv   — | j                  |«       | j                  «       }dD �ci c]  }|||   “Œ
 c}S c c}w )z�Gets the x,y position of the current window.

        Example:
        --------
        >>> driver.get_window_position()
        r�  )r“  r—  )r›   r�  ÚpositionrE   s       r:   Úget_window_positionzWebDriver.get_window_position;  s<   € ð 	×/Ñ/°Ô=Ø×'Ñ'Ó)ˆà(2Ö3 1��8˜A‘;‘Ò3Ð3ùÒ3s   ¦6c                 ó>   — |dk7  rt        j                  dd¬«       yy)z5Warns if the window handle is not equal to `current`.Úcurrentz?Only 'current' window is supported for W3C compatible browsers.r$   ru  N)rz  r{  )r›   r�  s     r:   r“  z,WebDriver._check_if_window_handle_is_currentH  s   € à˜9Ò$Ü�M‰MÐ[ÐhiÖjð %r9   c                 óF   — | j                  t        j                  «      d   S )z³Gets the x, y coordinates of the window as well as height and width
        of the current window.

        Example:
        --------
        >>> driver.get_window_rect()
        r»   )r¾   r)   ÚGET_WINDOW_RECTr¡   s    r:   r—  zWebDriver.get_window_rectM  r   r9   c                 óx   — |€|€|s|st        d«      ‚| j                  t        j                  ||||dœ«      d   S )aÏ  Sets the x, y coordinates of the window as well as height and width
        of the current window. This method is only supported for W3C compatible
        browsers; other browsers should use `set_window_position` and
        `set_window_size`.

        Example:
        --------
        >>> driver.set_window_rect(x=10, y=10)
        >>> driver.set_window_rect(width=100, height=200)
        >>> driver.set_window_rect(x=10, y=10, width=100, height=200)
        z'x and y or height and width need values)rš  r›  r�  r‘  r»   )r   r¾   r)   ÚSET_WINDOW_RECT)r›   rš  r›  r�  r‘  s        r:   r”  zWebDriver.set_window_rectW  sD   € ð ˆI˜!˜)©f¹UÜ*Ð+TÓUÐUà�|‰|œG×3Ñ3¸1À1ÈuÐ`fÑ5gÓhÐipÑqÐqr9   c                 ó   — | j                   S r¤   )Ú_file_detectorr¡   s    r:   r€   zWebDriver.file_detectori  s   € à×"Ñ"Ð"r9   c                 ób   — |st        d«      ‚t        |t        «      st        d«      ‚|| _        y)a_  Set the file detector to be used when sending keyboard input. By
        default, this is set to a file detector that does nothing.

        - see FileDetector
        - see LocalFileDetector
        - see UselessFileDetector

        Parameters:
        -----------
        detector : Any
            - The detector to use. Must not be None.
        z,You may not set a file detector that is nullz+Detector has to be instance of FileDetectorN)r   r[   r,   r©  )r›   Údetectors     r:   r€   zWebDriver.file_detectorm  s1   € ñ Ü$Ð%SÓTÐTÜ˜(¤LÔ1Ü$Ð%RÓSÐSØ&ˆÕr9   c                 óF   — | j                  t        j                  «      d   S )z„Gets the current orientation of the device.

        Example:
        --------
        >>> orientation = driver.orientation
        r»   )r¾   r)   ÚGET_SCREEN_ORIENTATIONr¡   s    r:   ÚorientationzWebDriver.orientation�  r  r9   c                 óŠ   — ddg}|j                  «       |v r#| j                  t        j                  d|i«       yt	        d«      ‚)zéSets the current orientation of the device.

        Parameters:
        -----------
        value : str
            - orientation to set it to.

        Example:
        --------
        >>> driver.orientation = "landscape"
        Ú	LANDSCAPEÚPORTRAITr®  z>You can only set the orientation to 'LANDSCAPE' and 'PORTRAIT'N)Úupperr¾   r)   ÚSET_SCREEN_ORIENTATIONr   )r›   r»   Úallowed_valuess      r:   r®  zWebDriver.orientation‹  sA   € ð & zÐ2ˆØ�;‰;‹=˜NÑ*Ø�L‰Lœ×7Ñ7¸-ÈÐ9OÕPä$Ð%eÓfÐfr9   c                 óJ  — | j                   rt        | j                   fS t        «        t        sÄ| j                  j	                  d«      rI| j                  j	                  d«      }| j                  j	                  d«      j                  d«      d   }n| j                  «       \  }}|st        d«      ‚t        j                  |«      a| j                  d   j                  «       dk(  rt        d«      ‚t        «      | _         | j                   j                  t        j                  j                  «       «      }|d   j                   }| j                   j                  t        j                  j#                  |d	«      «      }|| j                   _        t        | j                   fS )
Núse:cdpúse:cdpVersionrŸ   r   ú2Unable to find url to connect to from capabilitiesrT   ÚfirefoxzJCDP support for Firefox has been removed. Please switch to WebDriver BiDi.T)r“   Údevtoolsr;   rC   rV   rk  Ú_get_cdp_detailsr   r7   Úimport_devtoolsrx  ÚRuntimeErrorr5   r¾   ÚtargetÚget_targetsÚ	target_idÚattach_to_targetr‰   )r›   Úws_urlÚversionÚtargetsrÀ  Úsessions         r:   Ústart_devtoolszWebDriver.start_devtoolsž  sH  € à×%Ò%Ü˜T×7Ñ7Ð7Ð7ô ŒLåØ—9‘9—=‘= Ô*Ø!ŸY™YŸ]™]¨8Ó4�FØ"Ÿi™iŸm™m¨OÓ<×BÑBÀ3ÓGÈÑJ‘Gà&*×&;Ñ&;Ó&=‘O�G˜VáÜ,Ð-aÓbÐbä×.Ñ.¨wÓ7�Ø—9‘9˜]Ñ+×1Ñ1Ó3°yÒ@Ü&Ð'sÓtÐtÜ)<¸VÓ)DˆDÔ&Ø×0Ñ0×8Ñ8¼¿¹×9TÑ9TÓ9VÓWˆGØ ™
×,Ñ,ˆIØ×0Ñ0×8Ñ8¼¿¹×9YÑ9YÐZcÐeiÓ9jÓkˆGØ4;ˆD×&Ñ&Ô1Ü˜T×7Ñ7Ð7Ð7r9   c                ó  K  — t        «        | j                  j                  d«      rI| j                  j                  d«      }| j                  j                  d«      j                  d«      d   }n| j	                  «       \  }}|st        d«      ‚t        j                  |«      }t        j                  |«      4 ƒd {  –—† }|j                  |j                  j                  «       «      ƒ d {  –—† }|d   j                  }|j                  |«      4 ƒd {  –—† }t        |t        |«      ­–— d d d «      ƒd {  –—†  d d d «      ƒd {  –—†  y 7 Œ“7 Œd7 Œ=7 Œ# 1 ƒd {  –—†7  sw Y   Œ+xY w7 Œ"# 1 ƒd {  –—†7  sw Y   y xY w­w)Nr¶  r·  rŸ   r   r¸  )r;   rC   rV   rk  r»  r   r7   r¼  Úopen_cdpr¾   r¾  r¿  rÀ  Úopen_sessionr'   )r›   rÂ  rÃ  rº  ÚconnrÄ  rÀ  rÅ  s           r:   Úbidi_connectionzWebDriver.bidi_connectionº  s?  è ø€ ô 	ŒØ�9‰9�=‰=˜Ô"Ø—Y‘Y—]‘] 8Ó,ˆFØ—i‘i—m‘m OÓ4×:Ñ:¸3Ó?ÀÑB‰Gà"×3Ñ3Ó5‰OˆG�VáÜ$Ð%YÓZÐZä×&Ñ& wÓ/ˆÜ—<‘< Ó'÷ 	=ð 	=¨4Ø ŸL™L¨¯©×)DÑ)DÓ)FÓG×GˆGØ ™
×,Ñ,ˆIØ×(Ñ(¨Ó3÷ =ð =°wÜ$ W¬c°8Ó<Ó<÷=÷ =÷	=÷ 	=ñ 	=øØGøð=øð =ø÷ =÷ =ñ =úð	=ø÷ 	=÷ 	=ñ 	=üs¢   ‚B=FÂ?EÃ FÃ-E2Ã0EÃ1(E2ÄEÄE2ÄEÄ2E2Ä=EÄ>E2ÅFÅE0ÅFÅE2ÅE2ÅE2ÅE-	Å!E$Å"E-	Å)E2Å0FÅ2FÅ8E;Å9FÆ Fc                 óž   — | j                   s| j                  «        | j                  st        | j                   «      | _        | j                  S r¤   )r“   Ú_start_bidir”   r   r¡   s    r:   ré   zWebDriver.scriptÎ  s:   € à×)Ò)Ø×ÑÔà�|Š|Ü! $×"<Ñ"<Ó=ˆDŒLà�|‰|Ðr9   c                 ó¨   — | j                   j                  d«      r| j                   j                  d«      }nt        d«      ‚t        |«      | _        y )NÚwebSocketUrlr¸  )rC   rV   r   r5   r“   )r›   rÂ  s     r:   rÍ  zWebDriver._start_bidiØ  s=   € Ø�9‰9�=‰=˜Ô(Ø—Y‘Y—]‘] >Ó2‰Fä$Ð%YÓZÐZä%8¸Ó%@ˆÕ"r9   c                 ó¶   — | j                   s| j                  «        t        | d«      r| j                  €t	        | j                   «      | _        | j                  S )Nr•   )r“   rÍ  rÁ   r•   r   r¡   s    r:   ÚnetworkzWebDriver.networkà  sF   € à×)Ò)Ø×ÑÔä�t˜ZÔ(¨D¯M©MÐ,AÜ# D×$>Ñ$>Ó?ˆDŒMà�}‰}Ðr9   c                 óž   — | j                   s| j                  «        | j                  €t        | j                   «      | _        | j                  S )aÏ  Returns a browser module object for BiDi browser commands.

        Returns:
        --------
        Browser: an object containing access to BiDi browser commands.

        Examples:
        ---------
        >>> user_context = driver.browser.create_user_context()
        >>> user_contexts = driver.browser.get_user_contexts()
        >>> client_windows = driver.browser.get_client_windows()
        >>> driver.browser.remove_user_context(user_context)
        )r“   rÍ  r–   r   r¡   s    r:   ÚbrowserzWebDriver.browserê  s?   € ð ×)Ò)Ø×ÑÔà�=‰=Ð Ü# D×$>Ñ$>Ó?ˆDŒMà�}‰}Ðr9   c                 óž   — | j                   s| j                  «        | j                  €t        | j                   «      | _        | j                  S )zT
        Returns the BiDi session object for the current WebDriver session.
        )r“   rÍ  r—   r   r¡   s    r:   Ú_sessionzWebDriver._session  sD   € ð
 ×)Ò)Ø×ÑÔà×ÑÐ%Ü!(¨×)CÑ)CÓ!DˆDÔà×!Ñ!Ð!r9   c                 óž   — | j                   s| j                  «        | j                  €t        | j                   «      | _        | j                  S )a  Returns a browsing context module object for BiDi browsing context commands.

        Returns:
        --------
        BrowsingContext: an object containing access to BiDi browsing context commands.

        Examples:
        ---------
        >>> context_id = driver.browsing_context.create(type="tab")
        >>> driver.browsing_context.navigate(context=context_id, url="https://www.selenium.dev")
        >>> driver.browsing_context.capture_screenshot(context=context_id)
        >>> driver.browsing_context.close(context_id)
        )r“   rÍ  r˜   r   r¡   s    r:   Úbrowsing_contextzWebDriver.browsing_context  sD   € ð ×)Ò)Ø×ÑÔà×!Ñ!Ð)Ü%4°T×5OÑ5OÓ%PˆDÔ"à×%Ñ%Ð%r9   c                 óž   — | j                   s| j                  «        | j                  €t        | j                   «      | _        | j                  S )a9  Returns a storage module object for BiDi storage commands.

        Returns:
        --------
        Storage: an object containing access to BiDi storage commands.

        Examples:
        ---------
        >>> cookie_filter = CookieFilter(name="example")
        >>> result = driver.storage.get_cookies(filter=cookie_filter)
        >>> driver.storage.set_cookie(cookie=PartialCookie(
                "name", BytesValue(BytesValue.TYPE_STRING, "value"), "domain")
            )
        >>> driver.storage.delete_cookies(filter=CookieFilter(name="example"))
        )r“   rÍ  r™   r   r¡   s    r:   ÚstoragezWebDriver.storage%  s?   € ð" ×)Ò)Ø×ÑÔà�=‰=Ð Ü# D×$>Ñ$>Ó?ˆDŒMà�}‰}Ðr9   c                 óž   — | j                   s| j                  «        | j                  €t        | j                   «      | _        | j                  S )a¤  Returns a webextension module object for BiDi webextension commands.

        Returns:
        --------
        WebExtension: an object containing access to BiDi webextension commands.

        Examples:
        ---------
        >>> extension_path = "/path/to/extension"
        >>> extension_result = driver.webextension.install(path=extension_path)
        >>> driver.webextension.uninstall(extension_result)
        )r“   rÍ  rš   r   r¡   s    r:   ÚwebextensionzWebDriver.webextension>  sD   € ð ×)Ò)Ø×ÑÔà×ÑÐ%Ü!-¨d×.HÑ.HÓ!IˆDÔà×!Ñ!Ð!r9   c                 óL  — dd l }dd l}|j                  «       }| j                  j	                  d«      dk(  r+| j                  j	                  d«      j	                  d«      }nH| j                  j	                  d«      dk(  r*| j                  j	                  d«      j	                  d«      }|j                  dd	› d
�«      }|j                  |j                  «      }|j	                  d«      }|j	                  d«      }dd l}	|	j                  d|«      j                  d«      }
|
|fS )Nr   rT   Úchromezgoog:chromeOptionsÚdebuggerAddressÚMicrosoftEdgezms:edgeOptionsrä   zhttp://z/json/versionr   ÚwebSocketDebuggerUrlz
.*/(\d+)\.r&   )ÚjsonÚurllib3ÚPoolManagerrC   rV   ÚrequestÚloadsÚdataÚreÚsearchÚgroup)r›   rá  râ  ÚhttpÚdebugger_addressÚresræ  Úbrowser_versionÚwebsocket_urlrç  rÃ  s              r:   r»  zWebDriver._get_cdp_detailsT  só   € Ûãà×"Ñ"Ó$ˆØ�9‰9�=‰=˜Ó'¨8Ò3Ø#Ÿy™yŸ}™}Ð-AÓB×FÑFÐGXÓYÑØ�Y‰Y�]‰]˜=Ó)¨_Ò<Ø#Ÿy™yŸ}™}Ð-=Ó>×BÑBÐCTÓUÐà�l‰l˜5 GÐ,<Ð+=¸]Ð"KÓLˆØ�z‰z˜#Ÿ(™(Ó#ˆàŸ(™( 9Ó-ˆØŸ™Ð!7Ó8ˆãà—)‘)˜M¨?Ó;×AÑAÀ!ÓDˆà˜Ð%Ð%r9   c                 óp   — | j                  t        j                  |j                  «       «      d   | _        y)af  Adds a virtual authenticator with the given options.

        Example:
        --------
        >>> from selenium.webdriver.common.virtual_authenticator import VirtualAuthenticatorOptions
        >>> options = VirtualAuthenticatorOptions(protocol="u2f", transport="usb", device_id="myDevice123")
        >>> driver.add_virtual_authenticator(options)
        r»   N)r¾   r)   ÚADD_VIRTUAL_AUTHENTICATORr  r�   )r›   re   s     r:   Úadd_virtual_authenticatorz#WebDriver.add_virtual_authenticatorl  s-   € ð "&§¡¬g×.OÑ.OÐQX×Q`ÑQ`ÓQbÓ!cÐdkÑ!lˆÕr9   c                 ó   — | j                   S )z‹Returns the id of the virtual authenticator.

        Example:
        --------
        >>> print(driver.virtual_authenticator_id)
        )r�   r¡   s    r:   Úvirtual_authenticator_idz"WebDriver.virtual_authenticator_idw  s   € ð ×%Ñ%Ð%r9   c                 ój   — | j                  t        j                  d| j                  i«       d| _        y)zñRemoves a previously added virtual authenticator.

        The authenticator is no longer valid after removal, so no
        methods may be called.

        Example:
        --------
        >>> driver.remove_virtual_authenticator()
        ÚauthenticatorIdN)r¾   r)   ÚREMOVE_VIRTUAL_AUTHENTICATORr�   r¡   s    r:   Úremove_virtual_authenticatorz&WebDriver.remove_virtual_authenticator�  s,   € ð 	�‰”W×9Ñ9Ð<MÈt×OeÑOeÐ;fÔgØ!%ˆÕr9   Ú
credentialc                 ó€   — | j                  t        j                  i |j                  «       ¥d| j                  i¥«       y)a  Injects a credential into the authenticator.

        Example:
        --------
        >>> from selenium.webdriver.common.credential import Credential
        >>> credential = Credential(id="user@example.com", password="aPassword")
        >>> driver.add_credential(credential)
        rõ  N)r¾   r)   ÚADD_CREDENTIALr  r�   )r›   rø  s     r:   Úadd_credentialzWebDriver.add_credential�  s6   € ð 	�‰”W×+Ñ+Ð-p°
×0BÑ0BÓ0DÐ-pÐFWÐY]×YoÑYoÑ-pÕqr9   c                 ó°   — | j                  t        j                  d| j                  i«      }|d   D �cg c]  }t	        j
                  |«      ‘Œ c}S c c}w )zšReturns the list of credentials owned by the authenticator.

        Example:
        --------
        >>> credentials = driver.get_credentials()
        rõ  r»   )r¾   r)   ÚGET_CREDENTIALSr�   r    Ú	from_dict)r›   Úcredential_datarø  s      r:   Úget_credentialszWebDriver.get_credentials›  sL   € ð Ÿ,™,¤w×'>Ñ'>ÐARÐTX×TjÑTjÐ@kÓlˆØCRÐSZÑC[Ö\°Z”
×$Ñ$ ZÕ0Ò\Ð\ùÒ\s   ´AÚcredential_idc                 ó°   — t        |t        «      rt        |«      j                  «       }| j	                  t
        j                  || j                  dœ«       y)z»Removes a credential from the authenticator.

        Example:
        --------
        >>> credential_id = "user@example.com"
        >>> driver.remove_credential(credential_id)
        )ÚcredentialIdrõ  N)r[   Ú	bytearrayr   rn  r¾   r)   ÚREMOVE_CREDENTIALr�   )r›   r  s     r:   Úremove_credentialzWebDriver.remove_credential¦  sD   € ô �m¤YÔ/Ü-¨mÓ<×CÑCÓEˆMà�‰Ü×%Ñ%¸ÐZ^×ZpÑZpÑ'qõ	
r9   c                 ó\   — | j                  t        j                  d| j                  i«       y)z‡Removes all credentials from the authenticator.

        Example:
        --------
        >>> driver.remove_all_credentials()
        rõ  N)r¾   r)   ÚREMOVE_ALL_CREDENTIALSr�   r¡   s    r:   Úremove_all_credentialsz WebDriver.remove_all_credentials·  s$   € ð 	�‰”W×3Ñ3Ð6GÈ×I_ÑI_Ð5`Õar9   Úverifiedc                 ó^   — | j                  t        j                  | j                  |dœ«       y)a4  Sets whether the authenticator will simulate success or fail on user
        verification.

        Parameters:
        -----------
        verified: True if the authenticator will pass user verification, False otherwise.

        Example:
        --------
        >>> driver.set_user_verified(True)
        )rõ  ÚisUserVerifiedN)r¾   r)   ÚSET_USER_VERIFIEDr�   )r›   r
  s     r:   Úset_user_verifiedzWebDriver.set_user_verifiedÁ  s$   € ð 	�‰”W×.Ñ.ÀD×DZÑDZÐnvÑ0wÕxr9   c                 ó~   — d| j                   vrt        d«      ‚| j                  t        j                  «      d   d   S )z™Retrieves the downloadable files as a list of file names.

        Example:
        --------
        >>> files = driver.get_downloadable_files()
        úse:downloadsEnabledúCYou must enable downloads in order to work with downloadable files.r»   Únames)r=   r   r¾   r)   ÚGET_DOWNLOADABLE_FILESr¡   s    r:   Úget_downloadable_filesz WebDriver.get_downloadable_filesÐ  s=   € ð !¨×(9Ñ(9Ñ9Ü$Ð%jÓkÐkà�|‰|œG×:Ñ:Ó;¸GÑDÀWÑMÐMr9   Ú	file_nameÚtarget_directoryc                 óˆ  — d| j                   vrt        d«      ‚t        j                  j	                  |«      st        j
                  |«       | j                  t        j                  d|i«      d   d   }t        j                  «       5 }t        j                  j                  ||dz   «      }t        |d«      5 }|j                  t        j                  |«      «       ddd«       t!        j"                  |d	«      5 }|j%                  |«       ddd«       ddd«       y# 1 sw Y   ŒBxY w# 1 sw Y   ŒxY w# 1 sw Y   yxY w)
a–  Downloads a file with the specified file name to the target
        directory.

        Parameters:
        -----------
        file_name : str
            - The name of the file to download.

        target_directory : str
            - The path to the directory to save the downloaded file.

        Example:
        --------
        >>> driver.download_file("example.zip", "/path/to/directory")
        r  r  r¶   r»   Úcontentsz.ziprw  NÚr)r=   r   ÚosÚpathÚexistsÚmakedirsr¾   r)   ÚDOWNLOAD_FILEÚtempfileÚTemporaryDirectoryrj  r~  r  Úbase64r   ÚzipfileÚZipFileÚ
extractall)r›   r  r  r  Útmp_dirÚzip_fileÚfileÚzip_refs           r:   Údownload_filezWebDriver.download_fileÜ  s  € ð  !¨×(9Ñ(9Ñ9Ü$Ð%jÓkÐkä�w‰w�~‰~Ð.Ô/Ü�K‰KÐ(Ô)à—<‘<¤× 5Ñ 5¸À	Ð7JÓKÈGÑTÐU_Ñ`ˆä×(Ñ(Ó*ð 	5¨gÜ—w‘w—|‘| G¨Y¸Ñ-?Ó@ˆHÜ�h Ó%ð 7¨Ø—
‘
œ6×+Ñ+¨HÓ5Ô6÷7ô —‘ ¨3Ó/ð 5°7Ø×"Ñ"Ð#3Ô4÷5÷	5ð 	5÷7ð 7ú÷5ð 5ú÷	5ð 	5ús<   Â
0D8Â:%D ÃD8Ã=D,ÄD8Ä D)	Ä%D8Ä,D5	Ä1D8Ä8Ec                 ót   — d| j                   vrt        d«      ‚| j                  t        j                  «       y)zzDeletes all downloadable files.

        Example:
        --------
        >>> driver.delete_downloadable_files()
        r  r  N)r=   r   r¾   r)   ÚDELETE_DOWNLOADABLE_FILESr¡   s    r:   Údelete_downloadable_filesz#WebDriver.delete_downloadable_filesü  s0   € ð !¨×(9Ñ(9Ñ9Ü$Ð%jÓkÐkà�‰”W×6Ñ6Õ7r9   c                 ó   — | j                   S )a¶  Returns the Federated Credential Management (FedCM) dialog object
        for interaction.

        Returns:
        -------
        FedCM: an object providing access to all Federated Credential Management (FedCM) dialog commands.

        Examples:
        --------
        >>> title = driver.fedcm.title
        >>> subtitle = driver.fedcm.subtitle
        >>> dialog_type = driver.fedcm.dialog_type
        >>> accounts = driver.fedcm.account_list
        >>> driver.fedcm.select_account(0)
        >>> driver.fedcm.accept()
        >>> driver.fedcm.dismiss()
        >>> driver.fedcm.enable_delay()
        >>> driver.fedcm.disable_delay()
        >>> driver.fedcm.reset_cooldown()
        )r’   r¡   s    r:   ÚfedcmzWebDriver.fedcm  s   € ð, �{‰{Ðr9   c                 óV   — | j                   j                  t        j                  d«      S )z�Returns whether the browser supports FedCM capabilities.

        Example:
        --------
        >>> print(driver.supports_fedcm)
        F)r=   rV   r   ÚFEDCM_CAPABILITYr¡   s    r:   Úsupports_fedcmzWebDriver.supports_fedcm   s#   € ð × Ñ ×$Ñ$¤Z×%@Ñ%@À%ÓHÐHr9   c                 ó2   — | j                   st        d«      ‚y)z.Raises an exception if FedCM is not supported.znThis browser does not support Federated Credential Management. Please ensure you're using a supported browser.N)r1  r   r¡   s    r:   Ú_require_fedcm_supportz WebDriver._require_fedcm_support*  s#   € à×"Ò"Ü$ðBóð ð #r9   c                 ó8   — | j                  «        t        | «      S )zReturns the FedCM dialog object for interaction.

        Example:
        --------
        >>> dialog = driver.dialog
        )r3  r%   r¡   s    r:   ÚdialogzWebDriver.dialog2  s   € ð 	×#Ñ#Ô%Ü�d‹|Ðr9   c                 ó–   ‡ ‡‡— ddl mŠ ddlm} ‰ j	                  «        |€‰f}ˆˆ fd„Š |‰ |||¬«      }|j                  ˆfd„«      S )a  Waits for and returns the FedCM dialog.

        Parameters:
        -----------
        timeout : int
            - How long to wait for the dialog

        poll_frequency : floatHow
            - Frequently to poll

        ignored_exceptions : Any
            - Exceptions to ignore while waiting

        Returns:
        -------
            The FedCM dialog object if found

        Raises:
        -------
            TimeoutException if dialog doesn't appear
            WebDriverException if FedCM not supported
        r   )ÚNoAlertPresentException)ÚWebDriverWaitc                  óR   •— 	 t        ‰«      } | j                  r| S d S # ‰$ r Y y w xY wr¤   )r%   r    )r5  r7  r›   s    €€r:   Ú_check_fedcmz,WebDriver.fedcm_dialog.<locals>._check_fedcm\  s4   ø€ ðÜ ›�Ø!'§¢�vÐ6°$Ð6øØ*ò Ùðús   ƒ œ ž&¥&)Úpoll_frequencyÚignored_exceptionsc                 ó   •—  ‰«       S r¤   r8   )r\  r:  s    €r:   ú<lambda>z(WebDriver.fedcm_dialog.<locals>.<lambda>d  s	   ø€ ¡L£N€ r9   )Úselenium.common.exceptionsr7  Úselenium.webdriver.support.waitr8  r3  Úuntil)r›   Útimeoutr;  r<  r8  Úwaitr7  r:  s   `     @@r:   Úfedcm_dialogzWebDriver.fedcm_dialog=  sO   ú€ õ. 	GÝAà×#Ñ#Ô%àÐ%Ø"9Ð!;Ðõ	ñ ˜T 7¸>Ð^pÔqˆØ�z‰zÓ2Ó3Ð3r9   )zhttp://127.0.0.1:4444TNNNNNr¤   )rL   N)r£  )NNNN)é   g      à?N)…ry   rz   r{   r|   r4   rŽ   r2   rÎ   r   r\   r0   Úboolr   r,   r   r   r.   r    r(   rœ   r¢   r¥   r   ÚBaseExceptionÚtypesÚTracebackTyper«   r   r±   Úpropertyr/   r³   r¶   r�   r¹   rÌ   r‘   rÈ   rÔ   r×   rÝ   r	   r¾   rV   rè   r1   rí   rð   rò   rù   rü   rÿ   r  r  rª   r  r  r  r  r  r   r  r3   r  r"  r&  r)  r,  r
   r5  r8  r;  rD  rL  rN  rP  rT  r   rY  Úsetterr   ÚIDrf  rb  r=   r„  r†  r‡   r}  r‰  r•  r™  rž  r¡  r“  r—  r”  r€   r®  rÆ  r   rË  ré   rÍ  rÑ  rÓ  rÕ  r×  rÙ  rÛ  r»  r!   rñ  ró  r"   r÷  r    rû  r   r  r  r	  r  r…   r  r)  r,  r+   r.  r1  r3  r5  rD  r8   r9   r:   r   r   °   s‘  „ ñð "ÐØ €Oð :QØØ04ØCGØ8<Ø*.Ø04ñJ"à Ð%5Ð 5Ñ6ðJ"ð ðJ"ð   Ñ-ð	J"ð
 ˜% ¨T°+Ñ->Ð >Ñ?Ñ@ðJ"ð $Ð$4Ñ5ðJ"ð " $™ðJ"ð   Ñ-ðJ"ð 
óJ"òX`òðà˜4 Ñ.Ñ/ðð �mÑ$ðð ˜E×/Ñ/Ñ0ó	ð ñ3ó ð3ð< ð˜ò ó ðð ð	L�cò 	Ló ð	Lòòð¨$ð °4ó ò&ð7¨Sð 7°Zó 7òð\ 3ð \°$ó \ñ6K cð K°8¸DÀÀcÀ¹NÑ3Kð KÐW[Ð\_ÐadÐ\dÑWeó Kð@0�sð 0˜tó 0ð( ð@�sò @ó ð@ñ
# ð 
#¸)ó 
#ð
k 	ð 
k¨dó 
kð) D¨¡Ió )ðZ Só Zð8Z¨3ó Zð, ð>˜Sò >ó ð>ð ð>˜Sò >ó ð>ó$ó*ð ðL sò Ló ðLð ðE  S¡	ò Eó ðEó$ó0ó.ñB¨°Ñ(>ð BÈ#ó Bð  ð˜8ò ó ðó*&ó)ó&ð>˜T $™Zó >ð (¨4¡.ó ó <ó1óFð.Z¨Eð Z°dó Zð"X¨uð X¸ó Xðh°%ð h¸Dó hð$ ð$˜(ò $ó ð$ð( ‡_�_ò
Mó ð
Mð !Ÿe™e¸Dñ "Z¨H°S©Mð "ZÀZó "ZðH  "Ÿu™u¸Tñ $a¨X°c©]ð $aÀdÈ:ÑFVó $aðL ð˜dò ó ðð°$ó ð>5¨4ó 5ð"J uó Jð9¨#ó 9ñC¸3ð CÈtó Cñ$9¨Cð 9Àó 9ñ 8 Uð 8¨uð 8ÀCð 8ÐX\ó 8ñ$4¸Tó 4ðk¸sð kÀtó kð
> ó >ñrÈ$ó rð$ ð#˜|ò #ó ð#ð ×Ñò'ó ð'ð& ñEó ðEð ×Ñògó ðgò$8ð8 ñ=ó ð=ð& ñó ðòAð ñó ðð ñó ðð, ñ
"ó ð
"ð ñ&ó ð&ð, ñó ðð0 ñ"ó ð"ò*&ð0	mÐ1Lð 	mÐQUó 	mð ð&¨#ò &ó ð&ð $ò&ó $ð&ð $ð	r¨ð 	r¸ò 	ró $ð	rð $ð]  jÑ!1ò ]ó $ð]ð $ð
¨u°S¸)°^Ñ/Dð 
Èò 
ó $ð
ð  $òbó $ðbð $ðy¨$ð y°4ò yó $ðyð
N¨ó 
Nð5 sð 5¸cð 5Àdó 5ó@
8ð ð�uò ó ðð. ðI ò Ió ðIòð ñó ðô'4r9   r   r¤   )fr|   r!  r1  r@   r  rl  r  rH  rz  r"  Úabcr   r   r   r   r   Ú	importlibr   Útypingr	   r
   r   r   r   r   r?  r   r   r   r   r   Ú&selenium.webdriver.common.bidi.browserr   Ú/selenium.webdriver.common.bidi.browsing_contextr   Ú&selenium.webdriver.common.bidi.networkr   Ú%selenium.webdriver.common.bidi.scriptr   Ú&selenium.webdriver.common.bidi.sessionr   Ú&selenium.webdriver.common.bidi.storager   Ú+selenium.webdriver.common.bidi.webextensionr   Úselenium.webdriver.common.byr   Ú!selenium.webdriver.common.optionsr   r   Ú,selenium.webdriver.common.print_page_optionsr   Ú"selenium.webdriver.common.timeoutsr   Ú/selenium.webdriver.common.virtual_authenticatorr    r!   r"   Ú+selenium.webdriver.support.relative_locatorr#   Úcommon.fedcm.dialogr%   rË  r'   rK   r(   rø   r)   Úerrorhandlerr*   r.  r+   r€   r,   r-   r�   r.   r³   r/   Úremote_connectionr0   rë   r1   Ú
shadowrootr2   r  r3   Ú
webelementr4   Úwebsocket_connectionr5   r7   rº  r;   rG   rÌ   r\   rF  rd   rv   rx   r   r8   r9   r:   ú<module>rc     s<  ðñ$ $ã Û Û Û 	Û Û Û Û Û Ý ß /ß :Ý #ß 9× 9÷õ õ ;Ý KÝ :Ý 8Ý :Ý :Ý DÝ +ß EÝ EÝ 7÷ñ õ
 Cå (Ý +Ý 'Ý Ý &Ý ß :Ý /Ý Ý /Ý !Ý "Ý Ý "Ý 5à
€Ø€òBòOð4 -1ñØðà˜CÐ!1Ð1Ñ2ðð ðð ð	ð
 ˜LÑ)ðð óð6˜D Ñ-ð °$ó ôD˜gõ ôt4�õ t4r9   