How to go through the certificate error (insecure connection) screen with the WebDriver GeckoDriver for Firefox?
I'm tapping on a URL that displays this alert.
I've already added in the browser exceptions, but the problem continues. If you uncheck the option " Query OCSP servers to confirm the current validity of the certificates " continues the problem after WebDriver starts a browser session.
I load the profile of it by system default:
private static IWebDriver GetWebDriver(string path)
{
const string firefoxPath = @"...firefox.exe";
var service = FirefoxDriverService.CreateDefaultService(@"...GeckoDriver\");
service.FirefoxBinaryPath = firefoxPath;
var options = new FirefoxOptions
{
Profile = GetFirefoxProfile(path),
};
var driver = new FirefoxDriver(service, options, TimeSpan.FromMinutes(1));
return driver;
}
But it still does not work.
I even tried to set:
options.Profile.AcceptUntrustedCertificates = true;
options.Profile.AssumeUntrustedCertificateIssuer = true;
profile.SetPreference("acceptInsecureCerts", true);