Hello (first time posting here),
I am having trouble getting geckodriver to bypass certificate errors. I've done a lot of research and made sure that I have the latest versions of all components. Reason I stress that is because a lot of the past questions that exist on this site discuss obsolete methods such as using DesiredCapabilities.
This is my code:
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
FirefoxProfile profile = new FirefoxProfile("QA"){
AcceptUntrustedCertificates = true
};
FirefoxOptions options = new FirefoxOptions(){
Profile = profile
};
var driver = new FirefoxDriver(options);
driver.Navigate().GoToUrl("https://google.ca");
The code above fails and I still get certificate errors on Firefox. One thing I noticed when debugging it is that the driver still sees the capability "acceptInsecureCerts" as "false". Screenshot below.
Am I doing something wrong? Please advise.
I am currently using:
Aah! Found it: Firefox Options has an "addcapabilities" function that fixes it.
options.AddAdditionalCapability("acceptInsecureCerts", true, true);