I have upgraded Selenium and Firefox to the latest but the website I am testing now lands on the "Your connection is not secure" page and I can't get any of the suggestions online to work such as...
FirefoxOpts.SetPreference("webdriver_assume_untrusted_issuer", true);
FirefoxOpts.SetPreference("webdriver_accept_untrusted_certs", true);
FirefoxOpts.AddAdditionalCapability("acceptSslCerts", true);
FirefoxOpts.AddAdditionalCapability("acceptInsecureCerts", true);
I have also tried creating a profile and using...
FirefoxProfile profile = profileManager.GetProfile("Selenium");
profile.SetPreference("webdriver.firefox.profile", "Selenium");
...but these don't work either. This is using Selenium Grid.
UPDATE
Code block for webdriver initiation is:
var capabilities = new DesiredCapabilities();
var FirefoxOpts = new FirefoxOptions();
var profileManager = new FirefoxProfileManager();
var profile = profileManager.GetProfile("Selenium");
//profile.SetPreference("webdriver.firefox.profile", "Selenium");
//profile.AcceptUntrustedCertificates = true;
//profile.AssumeUntrustedCertificateIssuer = true;
//profile.AcceptUntrustedCertificates = true;
//profile.AssumeUntrustedCertificateIssuer = true;
//capabilities.SetCapability(CapabilityType.AcceptSslCertificates, true);
//FirefoxOpts.AddAdditionalCapability(CapabilityType.AcceptSslCertificates, true);
FirefoxOpts.BrowserExecutableLocation = @"C:\Program Files\Mozilla Firefox\firefox.exe";
FirefoxOpts.SetPreference("intl.accept_languages", "en-GB");
FirefoxOpts.SetPreference("layout.css.devPixelsPerPx", "0.8");
FirefoxOpts.Profile = profile;
FirefoxOpts.ToCapabilities();
//FirefoxOpts.SetPreference("webdriver_assume_untrusted_issuer", true);
//FirefoxOpts.SetPreference("webdriver_accept_untrusted_certs", true);
//FirefoxOpts.AddAdditionalCapability("acceptSslCerts", true);
//FirefoxOpts.AddAdditionalCapability("acceptInsecureCerts", true);
//FirefoxOpts.AddAdditionalCapability(CapabilityType.AcceptInsecureCertificates, true);
Driver = new RemoteWebDriver(new Uri("http://" + Config.VM + ":5566/wd/hub"), FirefoxOpts);
There's lots I've commented out which I've tried previously but nothing works regarding accepting the certs or launching Firefox with a specified profile