1
How to pass certificate error screen (insecure connection) with Geckodriver Firefox Webdriver?
I’m hitting a URL that displays this alert.
I already added in the browser exceptions, but the problem remains.
Uncheck the option to "Consult OCSP servers to confirm the current validity of certificates" continues the problem after Webdriver starts a browser session.
I load its profile 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 doesn’t work.
I even tried to set:
options.Profile.AcceptUntrustedCertificates = true;
options.Profile.AssumeUntrustedCertificateIssuer = true;
profile.SetPreference("acceptInsecureCerts", true);
Post a photo of the page.... maybe if you click "Advanced" at the bottom of the page, and then "Continue anyway", you can access the page.
– dot.Py
@dot. Py hello, this is the type of page that appears. But how to do this with the Webdriver? In exceptions of the browser is already. Thank you!
– JamesTK
I found this solution for python to look in the code to see if you find something like this: profile = webdriver.Firefoxprofile() profile.accept_untrusted_certs = True
– Denis
I momentarily solved the problem by fixing the version of Firefox on 47.0.2
– JamesTK