6

I am using Marionette / Geckodriver v9.0 for mac with selenium jar 2.53.1. When it opens firefox 47 I'm getting the error that "Your connection is not secure". The code I'm using to create the driver is:

  FirefoxProfile firefoxProfile = null; 
  firefoxProfile = new FirefoxProfile();
  firefoxProfile.setAcceptUntrustedCertificates(true);
  firefoxProfile.setAssumeUntrustedCertificateIssuer(false);

  DesiredCapabilities capability = DesiredCapabilities.firefox();
  capability.setCapability("marionette", true);
  capability.setCapability(FirefoxDriver.PROFILE, firefoxProfile);
  capability.setCapability("handlesAlerts", true);
  return new MarionetteDriver(capability);

So, how do I get it to add my website as an exception or turn off the check? Or is it a feature that Marionette hasn't implemented yet?

Karidrgn
  • 155
  • 1
  • 10
  • Can you post the full error or screenshot of the error – Madhan Jul 08 '16 at 04:48
  • 1
    Yes, its a known issue as of today. You need to provide a self signed certificate in the meanwhile https://bugzilla.mozilla.org/show_bug.cgi?id=1103196 – nilesh Jul 08 '16 at 04:52
  • The error I get in FF is that the owner of the certifcate has configured the website improperly. – Karidrgn Jul 18 '16 at 17:29
  • When I open the advanced it adds that the issuer certificate is unknown. error code: SEC_ERROR_UNKNOWN_ISSUER. Even though at this time I accept the certificate as an exception, the driver has thrown an error. I don't run into this problem when I open the site normally. – Karidrgn Jul 18 '16 at 17:42
  • In my opinion this situation is infuriating. People often use Selenium to test sites under development; why should Mozilla assume these sites have signed certs? Chromedriver doesn't have this problem and, prior to Marionette, neither did Firefox's driver. Why do people insist on 'fixing' what's not broken!? – sacheie Jan 04 '17 at 21:56

2 Answers2

0

You have to use nightly build of firefox of developer edition for now. It will not work on the current version.

https://bugzilla.mozilla.org/show_bug.cgi?id=1103196

J_01
  • 1
0

Firefox: 50.1.0 Gecko Driver: 0.13 (install nuget package: Selenium.Firefox.WebDriver.0.13.0)

Firstly, open a standard Firefox browser, and make sure the default Firefox profile has added the unsecured site into the certificate exception list. C# code as follows:

FirefoxProfileManager fpManager = new FirefoxProfileManager();

var profiles = fpManager.ExistingProfiles;
var defaultProfile = fpManager.GetProfile(profiles.First());

driver = new FirefoxDriver(defaultProfile);
Meyer
  • 1,662
  • 7
  • 21
  • 20
Ken Han
  • 16
  • 1
  • Be warned that with this, you won't be able to run another instance of Firefox at the same time (whether manual or marionette) because the profile is in use. – ivan_pozdeev Aug 24 '22 at 11:54