DevOps | Software Automation | Continuous Integration

Tag: FireFox

How To Bypass Untrusted SSL Connection II

I guess I have blogged about how to bypass Untrusted SSL Connection before by using your local computer’s FireFox with stored certificate. However, there are cases when by doing this itself is not sufficient.

Below is what you can do besides that:

1. Enter “about:config” in the address bar of your FireFox
2. Enter the following settings (https://pusso is the website I want to bypass)

3. Use the following code in your Selenium code

FirefoxProfile profile = new FirefoxProfile(@”pathtolocalfirefoxprofile”);
profile.SetPreference(“network.http.phishy-userpass-length”, 255);
profile.SetPreference(“network.automatic-ntlm-auth.trusted-uris”, “pusso”);

Selenium – How To Bypass Untrusted SSL Connection

In order to bypass the untrusted SSL connection error, you will need to:

  • Launch the browser from desktop
  • Manually adds the exception to bypass the untrusted SSL message
  • Declare the web driver to use the desktop browser’s profile instead of Selenium’s default profile
FirefoxProfile profile = new FirefoxProfile(@”C:UserschuanlAppDataRoaming¬†MozillaFirefoxProfilesqu7su2xj.default”);
IWebDriver driver = new FirefoxDriver(profile); 
  • Once that is done, when you run Selenium, you will not get the untrusted SSL message again.

© 2023 Chuan Chuan Law

Theme by Anders NorenUp ↑