Skip to content

Commit c9e0794

Browse files
AlexandreAbreuAutomatedTester
authored andcommitted
Add debugger_address option to the ChromeDriver options list to optionally instruct ChromeDriver to wait for the target devtools instance to be started at a given host:ip
Signed-off-by: AutomatedTester <dburns@mozilla.com>
1 parent ab25864 commit c9e0794

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

py/selenium/webdriver/chrome/options.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(self):
2828
self._extension_files = []
2929
self._extensions = []
3030
self._experimental_options = {}
31+
self._debugger_address = None
3132

3233
@property
3334
def binary_location(self):
@@ -46,6 +47,25 @@ def binary_location(self, value):
4647
"""
4748
self._binary_location = value
4849

50+
@property
51+
def debugger_address(self):
52+
"""
53+
Returns the address of the remote devtools instance
54+
"""
55+
return self._debugger_address
56+
57+
@debugger_address.setter
58+
def debugger_address(self, value):
59+
"""
60+
Allows you to set the address of the remote devtools instance
61+
that the ChromeDriver instance will try to connect to during an
62+
active wait.
63+
64+
:Args:
65+
- value: address of remote devtools instance if any (hostname[:port])
66+
"""
67+
self._debugger_address = value
68+
4969
@property
5070
def arguments(self):
5171
"""
@@ -141,6 +161,8 @@ def to_capabilities(self):
141161
if self.binary_location:
142162
chrome_options["binary"] = self.binary_location
143163
chrome_options["args"] = self.arguments
164+
if self.debugger_address:
165+
chrome_options["debuggerAddress"] = self.debugger_address
144166

145167
chrome["chromeOptions"] = chrome_options
146168

0 commit comments

Comments
 (0)