§
    ¯õi  ã                   óD   — d dl mZ d dlmZ d dlmZ  G d„ d¦  «        ZdS )é    )ÚUnion)ÚWebDriverException)Úcommand_builderc                   óF   — e Zd ZdZd„ Zddefd„Zdeeef         ddfd„Z	dS )	ÚWebExtensionz9
    BiDi implementation of the webExtension module.
    c                 ó   — || _         d S ©N)Úconn)Úselfr
   s     úw/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/selenium/webdriver/common/bidi/webextension.pyÚ__init__zWebExtension.__init__   s   € ØˆŒ	ˆ	ˆ	ó    NÚreturnc                 ót  — t          d„ |||fD ¦   «         ¦  «        dk    rt          d¦  «        ‚|�d|dœ}n|�d|dœ}n|�d|d	œ}d
|i}	 | j                             t	          d|¦  «        ¦  «        }|S # t
          $ r7}dt          |¦  «        v r t          t          |¦  «        › d�¦  «        |‚‚ d}~ww xY w)aª  Installs a web extension in the remote end.

        You must provide exactly one of the parameters.

        Parameters:
        -----------
            path: Path to an extension directory
            archive_path: Path to an extension archive file
            base64_value: Base64 encoded string of the extension archive

        Returns:
        -------
            Dict: A dictionary containing the extension ID.
        c              3   ó   K  — | ]}|d uV — Œ	d S r	   © )Ú.0Úxs     r   ú	<genexpr>z'WebExtension.install.<locals>.<genexpr>/   s&   è è € ÐIÐI ˆq˜ˆ}ÐIÐIÐIÐIÐIÐIr   é   zCExactly one of path, archive_path, or base64_value must be providedNÚpath)Útyper   ÚarchivePathÚbase64)r   ÚvalueÚextensionDatazwebExtension.installzMethod not availablezŸ. If you are using Chrome or Edge, add '--enable-unsafe-extension-debugging' and '--remote-debugging-pipe' arguments or set options.enable_webextensions = True)ÚsumÚ
ValueErrorr
   Úexecuter   r   Ústr)r   r   Úarchive_pathÚbase64_valueÚextension_dataÚparamsÚresultÚes           r   ÚinstallzWebExtension.install    s  € õ ÐIÐI t¨\¸<Ð&HÐIÑIÔIÑIÔIÈQÒNÐNÝÐbÑcÔcÐcàÐØ&,°dÐ;Ð;ˆNˆNØÐ%Ø&3¸\ÐJÐJˆNˆNØÐ%Ø&.¸ÐFÐFˆNà! >Ð2ˆð		Ø”Y×&Ò&¥Ð7MÈvÑ'VÔ'VÑWÔWˆFØˆMøÝ!ð 	ð 	ð 	Ø%­¨Q©¬Ð/Ð/Ý(Ý˜1‘v”vð ið ið iñô ð ðð øøøøð	øøøs   Á)A6 Á6
B7Â 2B2Â2B7Úextension_id_or_resultc                 ó¸   — t          |t          ¦  «        r|                     d¦  «        }n|}d|i}| j                             t          d|¦  «        ¦  «         dS )a!  Uninstalls a web extension from the remote end.

        Parameters:
        -----------
            extension_id_or_result: Either the extension ID as a string or the result dictionary
                                   from a previous install() call containing the extension ID.
        Ú	extensionzwebExtension.uninstallN)Ú
isinstanceÚdictÚgetr
   r   r   )r   r(   Úextension_idr$   s       r   Ú	uninstallzWebExtension.uninstallF   sb   € õ Ð,­dÑ3Ô3ð 	2Ø1×5Ò5°kÑBÔBˆLˆLà1ˆLà˜|Ð,ˆØŒ	×Ò�/Ð*BÀFÑKÔKÑLÔLÐLÐLÐLr   )NNN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r,   r'   r   r    r/   r   r   r   r   r      s�   € € € € € ðð ðð ð ð$ð $È$ð $ð $ð $ð $ðLM°°c¸4°iÔ0@ð MÀTð Mð Mð Mð Mð Mð Mr   r   N)Útypingr   Úselenium.common.exceptionsr   Ú%selenium.webdriver.common.bidi.commonr   r   r   r   r   ú<module>r7      sy   ðð$ Ð Ð Ð Ð Ð à 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø AÐ AÐ AÐ AÐ AÐ Að<Mð <Mð <Mð <Mð <Mñ <Mô <Mð <Mð <Mð <Mr   