是否可以使用Node.js在selenium-webdriver
中安装SSL证书?
例如,我需要将SSL证书添加到以下代码中:
var webdriver = require('selenium-webdriver'),
username = "MY-USER",
accessKey = "MY-KEY",
driver;
let proxy = require('selenium-webdriver/proxy');
driver = new webdriver.Builder().
withCapabilities({
'browserName': 'chrome',
'platform': 'Windows 10',
'version': '68',
'username': username,
'accessKey': accessKey
}).
setProxy(proxy.manual({https: 'host:8000'})).
usingServer("http://" + username + ":" + accessKey +
"@ondemand.saucelabs.com:80/wd/hub").
build();
driver.get("https://www.ford.com");
driver.quit();