ó
    ¼®ij"  ã                   ón   • S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr   " S S	\5      rg
)é    )ÚOptional)ÚChromiumOptions)ÚChromiumRemoteConnection)ÚChromiumService)ÚDriverFinder)ÚCommand)Ú	WebDriverc                   óP  ^ • \ rS rSrSr     S#S\\   S\\   S\\   S\\   S\	S	S4U 4S
 jjjr
S rS rS$S jrS$S jrS\S\S	S4S jrS\S\4U 4S jjrS	\4S jrS r\S 5       rS rS\S	\4S jrS\S	\4S jrS\S	\4S jrS\S	\4S jrS$U 4S jjrS rS  rS! rS"r U =r!$ )%ÚChromiumDriveré   zVControls the WebDriver instance of ChromiumDriver and allows you to
drive the browser.NÚbrowser_nameÚvendor_prefixÚoptionsÚserviceÚ
keep_aliveÚreturnc                 ó\  >• U(       a  UO	[        5       U l        U(       a  UO	[        5       n[        U R                  U5      nUR	                  5       (       a  UR	                  5       Ul        SUl        U R                  R                  5       =(       d    UR                  5       U R                  l	        U R                  R                  5         [        U R                  R                  UUUUR                  S9n [        TU ]=  XsS9  SU l        g! [          a    U R#                  5         e f = f)a  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	           €ÚRC:\des-py\RoboSAPF\venv\Lib\site-packages\selenium\webdriver\chromium\webdriver.pyr!   ÚChromiumDriver.__init__    sò   ø€ ö& #*‘w¬Ó/@ˆŒÞ$‘'¬/Ó*;ˆä˜dŸl™l¨GÓ4ˆØ×"Ñ"×$Ñ$Ø&,×&=Ñ&=Ó&?ˆGÔ#Ø&*ˆGÔ#à ŸL™L×1Ñ1Ó3×O°v×7MÑ7MÓ7Oˆ�‰ÔØ�‰×ÑÔä+Ø#Ÿ|™|×7Ñ7Ø%Ø'Ø!Ø ×4Ñ4ñ
ˆð	Ü‰GÑ¨hÐÑHð
  ˆ�øô	 ó 	Ø�I‰IŒKØð	ús   Ã:D ÄD+c                 ó*   • U R                  SSU05      $ )z\Launches Chromium app specified by id.

Args:
    id: The id of the Chromium app to launch.
Ú	launchAppÚid©Úexecute)r%   r-   s     r)   Ú
launch_appÚChromiumDriver.launch_appN   s   € ð �|‰|˜K¨$°¨Ó4Ð4ó    c                 ó*   • U R                  S5      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_conditionsÚ%ChromiumDriver.get_network_conditionsV   s   € ð �|‰|Ð2Ó3°GÑ<Ð<r2   c                 ó,   • U R                  SSU05        g)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%   r;   s     r)   Úset_network_conditionsÚ%ChromiumDriver.set_network_conditions^   s   € ð  	�‰Ð+Ð.BÐDVÐ-WÕXr2   c                 ó&   • U R                  S5        g)z+Resets Chromium network emulation settings.ÚdeleteNetworkConditionsNr.   r6   s    r)   Údelete_network_conditionsÚ(ChromiumDriver.delete_network_conditionsp   s   € à�‰Ð.Õ/r2   Únamer5   c                 ó2   • U R                  SSU0US.5        g)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")
ÚsetPermissionsrB   )Ú
descriptorÚstateNr.   )r%   rB   r5   s      r)   Úset_permissionsÚChromiumDriver.set_permissionst   s   € ð 	�‰Ð%°v¸t°nÈuÑ'UÕVr2   ÚcmdÚcmd_argsc                 ó"   >• [         TU ]  X5      $ )aK  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%   rI   rJ   r(   s      €r)   rL   ÚChromiumDriver.execute_cdp_cmd€   s   ø€ ô$ ‰wÑ& sÓ5Ð5r2   c                 ó*   • U R                  S5      S   $ )z2
Returns:
    A list of sinks available for Cast.
ÚgetSinksr5   r.   r6   s    r)   Ú	get_sinksÚChromiumDriver.get_sinks”   s   € ð
 �|‰|˜JÓ'¨Ñ0Ð0r2   c                 ó*   • U R                  S5      S   $ )zJ
Returns:
    An error message when there is any issue in a Cast session.
ÚgetIssueMessager5   r.   r6   s    r)   Úget_issue_messageÚ ChromiumDriver.get_issue_message›   s   € ð
 �|‰|Ð-Ó.¨wÑ7Ð7r2   c                 óF   • U R                  [        R                  5      S   $ )zPGets a list of the available log types.

Example:
--------
>>> driver.log_types
r5   )r/   r   ÚGET_AVAILABLE_LOG_TYPESr6   s    r)   Ú	log_typesÚChromiumDriver.log_types¢   s   € ð �|‰|œG×;Ñ;Ó<¸WÑEÐEr2   c                 óL   • U R                  [        R                  SU05      S   $ )zï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")
Útyper5   )r/   r   ÚGET_LOG)r%   Úlog_types     r)   Úget_logÚChromiumDriver.get_log¬   s#   € ð �|‰|œGŸO™O¨f°hÐ-?Ó@ÀÑIÐIr2   Ú	sink_namec                 ó*   • U R                  SSU05      $ )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%   r`   s     r)   Úset_sink_to_useÚChromiumDriver.set_sink_to_useº   s   € ð �|‰|˜N¨Z¸Ð,CÓDÐDr2   c                 ó*   • U R                  SSU05      $ )zStarts a desktop mirroring session on a specific receiver target.

Args:
    sink_name: Name of the sink to use as the target.
ÚstartDesktopMirroringrc   r.   rd   s     r)   Ústart_desktop_mirroringÚ&ChromiumDriver.start_desktop_mirroringÃ   s   € ð �|‰|Ð3°jÀ)Ð5LÓMÐMr2   c                 ó*   • U R                  SSU05      $ )z{Starts a tab mirroring session on a specific receiver target.

Args:
    sink_name: Name of the sink to use as the target.
ÚstartTabMirroringrc   r.   rd   s     r)   Ústart_tab_mirroringÚ"ChromiumDriver.start_tab_mirroringË   s   € ð �|‰|Ð/°*¸iÐ1HÓIÐIr2   c                 ó*   • U R                  SSU05      $ )z€Stops the existing Cast session on a specific receiver target.

Args:
    sink_name: Name of the sink to stop the Cast session.
ÚstopCastingrc   r.   rd   s     r)   Ústop_castingÚChromiumDriver.stop_castingÓ   s   € ð �|‰|˜M¨J¸	Ð+BÓCÐCr2   c                 ó¶   >•  [         TU ]  5         U R                  R	                  5         g! [         a     N'f = f! U R                  R	                  5         f = f)z@Closes the browser and shuts down the ChromiumDriver executable.N)r    r#   r"   r   Ústop)r%   r(   s    €r)   r#   ÚChromiumDriver.quitÛ   sJ   ø€ ð	 Ü‰G‰LŒNð
 �L‰L×ÑÕøô	 ó 	áð	ûð �L‰L×ÑÕús   ƒ, ¬
9¶< ¸9¹< ¼Ac                 ó   • [         e)zCDownload file functionality is not implemented for Chromium driver.©ÚNotImplementedError©r%   ÚargsÚkwargss      r)   Údownload_fileÚChromiumDriver.download_fileå   ó   € ä!Ð!r2   c                 ó   • [         e)zLGet downloadable files functionality is not implemented for Chromium driver.rw   ry   s      r)   Úget_downloadable_filesÚ%ChromiumDriver.get_downloadable_filesé   r~   r2   c                 ó   • [         e)zODelete downloadable files functionality is not implemented for Chromium driver.rw   ry   s      r)   Údelete_downloadable_filesÚ(ChromiumDriver.delete_downloadable_filesí   r~   r2   )r$   r   )NNNNT)r   N)"Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ústrr   r   Úboolr!   r0   r7   r<   r@   rG   ÚdictrL   ÚlistrP   rT   ÚpropertyrX   r^   re   ri   rm   rq   r#   r|   r€   rƒ   Ú__static_attributes__Ú__classcell__)r(   s   @r)   r   r      sT  ø† ñð
 '+Ø'+Ø-1Ø-1Øñ, à˜s‘mð, ð   ‘}ð, ð ˜/Ñ*ð	, ð
 ˜/Ñ*ð, ð ð, ð 
÷, ð , ò\5ò=ôYô$0ð
W Cð 
W°ð 
W¸ô 
Wð6 3ð 6°$÷ 6ð(1˜4ô 1ò8ð ñFó ðFòJðE¨ð E°ô EðN°ð N¸ô NðJ¨Sð J°Tô JðD cð D¨dô D÷ ò"ò"÷"ð "r2   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   © r2   r)   Ú<module>rš      s*   ðõ$ å ?Ý RÝ ?Ý @Ý 5Ý LôS"�_õ S"r2   