§
    ¯õij"  ã                   óv   — 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  G d„ d	e¦  «        Zd
S )é    )ÚOptional)ÚChromiumOptions)ÚChromiumRemoteConnection)ÚChromiumService)ÚDriverFinder)ÚCommand)Ú	WebDriverc                   óH  ‡ — e Zd ZdZ	 	 	 	 	 d"dee         dee         dee         dee         ded	dfˆ fd
„Z	d„ Z
d„ Zd#d„Zd#d„Zdeded	dfd„Zdedefˆ fd„Zd	efd„Zd„ Zed„ ¦   «         Zd„ Zded	efd„Zded	efd„Zded	efd„Zded	efd„Zd#ˆ fd„Zd„ Zd „ Zd!„ Zˆ xZS )$ÚChromiumDriverzZControls the WebDriver instance of ChromiumDriver and allows you to
    drive the browser.NTÚbrowser_nameÚvendor_prefixÚoptionsÚserviceÚ
keep_aliveÚreturnc                 óp  •— |r|nt          ¦   «         | _        |r|nt          ¦   «         }t          | j        |¦  «        }|                     ¦   «         r |                     ¦   «         |_        d|_        | j                             ¦   «         p|                     ¦   «         | j        _	        | j         
                    ¦   «          t          | j        j        ||||j        ¬¦  «        }	 t          ¦   «                              ||¬¦  «         n## t           $ r |                      ¦   «          ‚ w xY wd| _        dS )aV  Creates a new WebDriver instance of the ChromiumDriver. Starts the
        service and then creates new WebDriver instance of ChromiumDriver.

        Args:
            browser_name: Browser name used when matching capabilities.
            vendor_prefix: Company prefix to apply to vendor-specific WebDriver extension commands.
            options: This takes an instance of ChromiumOptions.
            service: Service object for handling the browser driver if you need to pass extra details.
            keep_alive: Whether to configure ChromiumRemoteConnection to use HTTP keep-alive.
        N)Úremote_server_addrr   r   r   Úignore_proxy)Úcommand_executorr   F)r   r   r   r   Úget_browser_pathÚbinary_locationÚbrowser_versionÚenv_pathÚget_driver_pathÚpathÚstartr   Úservice_urlÚ_ignore_local_proxyÚsuperÚ__init__Ú	ExceptionÚquitÚ
_is_remote)	Úselfr   r   r   r   r   ÚfinderÚexecutorÚ	__class__s	           €úq/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.pyr    zChromiumDriver.__init__    s5  ø€ ð& #*Ð@�w�w­Ñ/@Ô/@ˆŒØ$Ð;�'�'­/Ñ*;Ô*;ˆå˜dœl¨GÑ4Ô4ˆØ×"Ò"Ñ$Ô$ð 	+Ø&,×&=Ò&=Ñ&?Ô&?ˆGÔ#Ø&*ˆGÔ#à œL×1Ò1Ñ3Ô3ÐO°v×7MÒ7MÑ7OÔ7OˆŒÔØŒ×ÒÑÔÐå+Ø#œ|Ô7Ø%Ø'Ø!Ø Ô4ð
ñ 
ô 
ˆð	Ý‰GŒG×Ò¨hÀÐÑHÔHÐHÐHøÝð 	ð 	ð 	Ø�IŠI‰KŒKˆKØð	øøøð  ˆŒˆˆs   Ã(#D Ä D,c                 ó2   — |                       dd|i¦  «        S )ztLaunches Chromium app specified by id.

        Args:
            id: The id of the Chromium app to launch.
        Ú	launchAppÚid©Úexecute)r$   r+   s     r(   Ú
launch_appzChromiumDriver.launch_appN   s   € ð �|Š|˜K¨$°¨Ñ4Ô4Ð4ó    c                 ó8   — |                       d¦  «        d         S )z¦Gets Chromium network emulation settings.

        Returns:
            A dict. For example: {'latency': 4, 'download_throughput': 2, 'upload_throughput': 2}
        ÚgetNetworkConditionsÚvaluer,   ©r$   s    r(   Úget_network_conditionsz%ChromiumDriver.get_network_conditionsV   s   € ð �|Š|Ð2Ñ3Ô3°GÔ<Ð<r/   c                 ó6   — |                       dd|i¦  «         dS )a  Sets Chromium network emulation settings.

        Args:
            **network_conditions: A dict with conditions specification.

        Example:
            driver.set_network_conditions(
                offline=False,
                latency=5,  # additional latency (ms)
                download_throughput=500 * 1024,  # maximal throughput
                upload_throughput=500 * 1024,
            )  # maximal throughput

            Note: 'throughput' can be used to set both (for download and upload).
        ÚsetNetworkConditionsÚnetwork_conditionsNr,   )r$   r7   s     r(   Úset_network_conditionsz%ChromiumDriver.set_network_conditions^   s&   € ð  	�ŠÐ+Ð.BÐDVÐ-WÑXÔXÐXÐXÐXr/   c                 ó0   — |                       d¦  «         dS )z+Resets Chromium network emulation settings.ÚdeleteNetworkConditionsNr,   r3   s    r(   Údelete_network_conditionsz(ChromiumDriver.delete_network_conditionsp   s   € à�ŠÐ.Ñ/Ô/Ð/Ð/Ð/r/   Únamer2   c                 ó<   — |                       dd|i|dœ¦  «         dS )zéSets Applicable Permission.

        Args:
            name: The item to set the permission on.
            value: The value to set on the item

        Example:
            driver.set_permissions("clipboard-read", "denied")
        ÚsetPermissionsr<   )Ú
descriptorÚstateNr,   )r$   r<   r2   s      r(   Úset_permissionszChromiumDriver.set_permissionst   s+   € ð 	�ŠÐ%°v¸t°nÈuÐ'UÐ'UÑVÔVÐVÐVÐVr/   ÚcmdÚcmd_argsc                 óH   •— t          ¦   «                              ||¦  «        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/

        Args:
            cmd: A str, command name
            cmd_args: A dict, command args. empty dict {} if there is no command args

        Example:
            driver.execute_cdp_cmd('Network.getResponseBody', {'requestId': requestId})

        Returns:
            A dict, empty dict {} if there is no result to return.
            For example to getResponseBody:
            {'base64Encoded': False, 'body': 'response body string'}
        )r   Úexecute_cdp_cmd)r$   rB   rC   r'   s      €r(   rE   zChromiumDriver.execute_cdp_cmd€   s   ø€ õ$ ‰wŒw×&Ò& s¨HÑ5Ô5Ð5r/   c                 ó8   — |                       d¦  «        d         S )zJ
        Returns:
            A list of sinks available for Cast.
        ÚgetSinksr2   r,   r3   s    r(   Ú	get_sinkszChromiumDriver.get_sinks”   s   € ð
 �|Š|˜JÑ'Ô'¨Ô0Ð0r/   c                 ó8   — |                       d¦  «        d         S )zb
        Returns:
            An error message when there is any issue in a Cast session.
        ÚgetIssueMessager2   r,   r3   s    r(   Úget_issue_messagez ChromiumDriver.get_issue_message›   s   € ð
 �|Š|Ð-Ñ.Ô.¨wÔ7Ð7r/   c                 óL   — |                       t          j        ¦  «        d         S )zpGets a list of the available log types.

        Example:
        --------
        >>> driver.log_types
        r2   )r-   r   ÚGET_AVAILABLE_LOG_TYPESr3   s    r(   Ú	log_typeszChromiumDriver.log_types¢   s   € ð �|Š|�GÔ;Ñ<Ô<¸WÔEÐEr/   c                 óR   — |                       t          j        d|i¦  «        d         S )a/  Gets the log for a given log type.

        Args:
            log_type: Type of log that which will be returned

        Example:
            >>> driver.get_log("browser")
            >>> driver.get_log("driver")
            >>> driver.get_log("client")
            >>> driver.get_log("server")
        Útyper2   )r-   r   ÚGET_LOG)r$   Úlog_types     r(   Úget_logzChromiumDriver.get_log¬   s$   € ð �|Š|�GœO¨f°hÐ-?Ñ@Ô@ÀÔIÐIr/   Ú	sink_namec                 ó2   — |                       dd|i¦  «        S )z¦Sets a specific sink, using its name, as a Cast session receiver
        target.

        Args:
            sink_name: Name of the sink to use as the target.
        ÚsetSinkToUseÚsinkNamer,   ©r$   rT   s     r(   Úset_sink_to_usezChromiumDriver.set_sink_to_useº   s   € ð �|Š|˜N¨Z¸Ð,CÑDÔDÐDr/   c                 ó2   — |                       dd|i¦  «        S )z—Starts a desktop mirroring session on a specific receiver target.

        Args:
            sink_name: Name of the sink to use as the target.
        ÚstartDesktopMirroringrW   r,   rX   s     r(   Ústart_desktop_mirroringz&ChromiumDriver.start_desktop_mirroringÃ   s   € ð �|Š|Ð3°jÀ)Ð5LÑMÔMÐMr/   c                 ó2   — |                       dd|i¦  «        S )z“Starts a tab mirroring session on a specific receiver target.

        Args:
            sink_name: Name of the sink to use as the target.
        ÚstartTabMirroringrW   r,   rX   s     r(   Ústart_tab_mirroringz"ChromiumDriver.start_tab_mirroringË   s   € ð �|Š|Ð/°*¸iÐ1HÑIÔIÐIr/   c                 ó2   — |                       dd|i¦  «        S )z˜Stops the existing Cast session on a specific receiver target.

        Args:
            sink_name: Name of the sink to stop the Cast session.
        ÚstopCastingrW   r,   rX   s     r(   Ústop_castingzChromiumDriver.stop_castingÓ   s   € ð �|Š|˜M¨J¸	Ð+BÑCÔCÐCr/   c                 óÚ   •— 	 t          ¦   «                              ¦   «          n# t          $ r Y nw xY w| j                             ¦   «          dS # | j                             ¦   «          w xY w)z@Closes the browser and shuts down the ChromiumDriver executable.N)r   r"   r!   r   Ústop)r$   r'   s    €r(   r"   zChromiumDriver.quitÛ   sq   ø€ ð	 Ý‰GŒG�LŠL‰NŒNˆNˆNøÝð 	ð 	ð 	àˆDð	øøøð ŒL×ÒÑÔÐÐÐøˆDŒL×ÒÑÔÐÐøøøs!   ƒ $ £A ¤
1®A °1±A ÁA*c                 ó   — t           ‚)zCDownload file functionality is not implemented for Chromium driver.©ÚNotImplementedError©r$   ÚargsÚkwargss      r(   Údownload_filezChromiumDriver.download_fileå   ó   € å!Ð!r/   c                 ó   — t           ‚)zLGet downloadable files functionality is not implemented for Chromium driver.rf   rh   s      r(   Úget_downloadable_filesz%ChromiumDriver.get_downloadable_filesé   rl   r/   c                 ó   — t           ‚)zODelete downloadable files functionality is not implemented for Chromium driver.rf   rh   s      r(   Údelete_downloadable_filesz(ChromiumDriver.delete_downloadable_filesí   rl   r/   )NNNNT)r   N) Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ústrr   r   Úboolr    r.   r4   r8   r;   rA   ÚdictrE   ÚlistrH   rK   ÚpropertyrN   rS   rY   r\   r_   rb   r"   rk   rn   rp   Ú__classcell__)r'   s   @r(   r   r      s•  ø€ € € € € ðð ð
 '+Ø'+Ø-1Ø-1Øð, ð , à˜s”mð, ð   ”}ð, ð ˜/Ô*ð	, ð
 ˜/Ô*ð, ð ð, ð 
ð, ð , ð , ð , ð , ð , ð\5ð 5ð 5ð=ð =ð =ðYð Yð Yð Yð$0ð 0ð 0ð 0ð
W Cð 
W°ð 
W¸ð 
Wð 
Wð 
Wð 
Wð6 3ð 6°$ð 6ð 6ð 6ð 6ð 6ð 6ð(1˜4ð 1ð 1ð 1ð 1ð8ð 8ð 8ð ðFð Fñ „XðFðJð Jð JðE¨ð E°ð Eð Eð Eð EðN°ð N¸ð Nð Nð Nð NðJ¨Sð J°Tð Jð Jð Jð JðD cð D¨dð Dð Dð Dð Dð ð  ð  ð  ð  ð  ð"ð "ð "ð"ð "ð "ð"ð "ð "ð "ð "ð "ð "r/   r   N)Útypingr   Ú#selenium.webdriver.chromium.optionsr   Ú-selenium.webdriver.chromium.remote_connectionr   Ú#selenium.webdriver.chromium.servicer   Ú'selenium.webdriver.common.driver_finderr   Ú!selenium.webdriver.remote.commandr   Ú#selenium.webdriver.remote.webdriverr	   ÚRemoteWebDriverr   © r/   r(   ú<module>r„      sÃ   ðð$ Ð Ð Ð Ð Ð à ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø RÐ RÐ RÐ RÐ RÐ RØ ?Ð ?Ð ?Ð ?Ð ?Ð ?Ø @Ð @Ð @Ð @Ð @Ð @Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø LÐ LÐ LÐ LÐ LÐ LðS"ð S"ð S"ð S"ð S"�_ñ S"ô S"ð S"ð S"ð S"r/   