Skip to content

Commit 341b454

Browse files
Support new Cast command added to Chrome Devtools (#10150)
* Support new Cast command added to Chrome Devtools * Update remote_connection.py * Update remote_connection.py * Update webdriver.py
1 parent 2e283ad commit 341b454

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎py/selenium/webdriver/chromium/remote_connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ def __init__(self, remote_server_addr, vendor_prefix, browser_name, keep_alive=T
3131
self._commands['getSinks'] = ('GET', '/session/$sessionId/{}/cast/get_sinks'.format(vendor_prefix))
3232
self._commands['getIssueMessage'] = ('GET', '/session/$sessionId/{}/cast/get_issue_message'.format(vendor_prefix))
3333
self._commands['setSinkToUse'] = ('POST', '/session/$sessionId/{}/cast/set_sink_to_use'.format(vendor_prefix))
34+
self._commands['startDesktopMirroring'] = ('POST', '/session/$sessionId/{}/cast/start_desktop_mirroring'.format(vendor_prefix))
3435
self._commands['startTabMirroring'] = ('POST', '/session/$sessionId/{}/cast/start_tab_mirroring'.format(vendor_prefix))
3536
self._commands['stopCasting'] = ('POST', '/session/$sessionId/{}/cast/stop_casting'.format(vendor_prefix))

‎py/selenium/webdriver/chromium/webdriver.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ def set_sink_to_use(self, sink_name: str) -> str:
199199
"""
200200
return self.execute('setSinkToUse', {'sinkName': sink_name})
201201

202+
def start_desktop_mirroring(self, sink_name: str) -> str:
203+
"""
204+
Starts a desktop mirroring session on a specific receiver target.
205+
206+
:Args:
207+
- sink_name: Name of the sink to use as the target.
208+
"""
209+
return self.execute('startDesktopMirroring', {'sinkName': sink_name})
210+
202211
def start_tab_mirroring(self, sink_name: str) -> str:
203212
"""
204213
Starts a tab mirroring session on a specific receiver target.

0 commit comments

Comments
 (0)