There is a list of recognized "capabilities" in Webdriver and "debuggerAddress" is among them.
But I can't find a way to set such option neither in Capabilities class not in CromeOptions in javascript api.
As I can see in several questions "debuggerAddress" option (or capability?) is possible to set in Python api.
What I try is similar to this question, from node app
To link app to already started webdriver (cromedriver.exe). This is ok with
webdriver.Builder().usingServer( 'http://localhost:9515' )
Ask webdriver not to start new Chrome instance but instead to link to already started with --remote-debugging-port=XXXXX
Chrome parameter. And this should be done with "debuggerAddress"
option/capability, but I can't realize how to do it with javascript api.
It appears there is no API exposed for that. But I managed to get it to work using this hack:
var chrome = require("selenium-webdriver/chrome");
var options = new chrome.Options();
options.options_["debuggerAddress"] = "127.0.0.1:6813";
var driver = new webdriver.Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
See this for the full basic example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With