ó
    ¼®i  ã                   ó<   • S SK Jr  S SKJr  S SKJr   " S S5      rg)é    )ÚUnion)ÚWebDriverException)Úcommand_builderc                   óL   • \ rS rSrSrS rS
S\4S jjrS\\	\4   SS4S jr
S	rg)ÚWebExtensioné   z1
BiDi implementation of the webExtension module.
c                 ó   • Xl         g ©N©Úconn)Úselfr   s     ÚXC:\des-py\RoboSAPF\venv\Lib\site-packages\selenium\webdriver\common\bidi\webextension.pyÚ__init__ÚWebExtension.__init__   s   € Ø�	ó    NÚreturnc                 óH  • [        S XU4 5       5      S:w  a  [        S5      eUb  SUS.nOUb  SUS.nOUb  SUS	.nS
W0n U R                  R                  [	        SU5      5      nU$ ! [
         a-  nS[        U5      ;   a  [        [        U5       S35      Uee SnAff = f)aZ  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   ó(   #   • U  H  oS Lv •  M
     g 7fr
   © )Ú.0Úxs     r   Ú	<genexpr>Ú'WebExtension.install.<locals>.<genexpr>/   s   é € ÐIÒ&H ˜�}Ò&Hùs   ‚é   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   ÚinstallÚWebExtension.install    sÐ   € ô ÑI t¸<Ñ&HÓIÓIÈQÓNÜÐbÓcÐcàÑØ&,°dÑ;‰NØÑ%Ø&3¸\ÑJ‰NØÑ%Ø&.¸ÑFˆNà! >Ð2ˆð		Ø—Y‘Y×&Ñ&¤Ð7MÈvÓ'VÓWˆFØˆMøÜ!ó 	Ø%¬¨Q«Ó/Ü(Ü˜1“v�hð ið ióð ðð ûð	ús   Á&A* Á*
B!Á4(BÂB!Úextension_id_or_resultc                 ó¨   • [        U[        5      (       a  UR                  S5      nOUnSU0nU R                  R	                  [        SU5      5        g)zù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   Ú	uninstallÚWebExtension.uninstallF   sK   € ô Ð,¬d×3Ñ3Ø1×5Ñ5°kÓB‰Là1ˆLà˜|Ð,ˆØ�	‰	×Ñœ/Ð*BÀFÓKÕLr   r   )NNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r1   r+   r   r$   r4   Ú__static_attributes__r   r   r   r   r      s8   † ñòñ$È$õ $ðLM°°c¸4°iÑ0@ð MÀT÷ Mr   r   N)Útypingr   Úselenium.common.exceptionsr   Ú%selenium.webdriver.common.bidi.commonr   r   r   r   r   Ú<module>r?      s   ðõ$ å 9Ý A÷<Mò <Mr   