Its been a while I'm trying to figure out a way to automatically accept SSL certs. But unfortunately no luck. So, here is the case, I'm working on selenium tests. And, every time when I run the test on chrome, a small pop-up appears asking to select a certificate.
I tried this in python: How to deal with certificates using Selenium?
I also tried (in javascript):
var options = new chrome.Options();
options.addArguments("--ignore-certificate-errors")
But it doesn't seems to work!
In firefox, there is an option to automatically selects certs. Is there any way in selenium or in chrome settings which automatically selects the certs? Will ENTER/RETURN keys in selenium work?
EDITED: Below is my code. Is this the right way to use?
var launch = function(){
var options = new chrome.Options();
options.addArguments("--test-type");
/* Also tried options.addArguments(“--ignore-certificate-errors")
*/
var driver = new webdriver.Builder()
.usingServer('http://127.0.0.1:4444/wd/hub')
.setChromeOptions(options)
.build();
driver.get(url)
}
P.S Here, I'm using JavaScript.