I'm on selenium 2.53.0 (I don't want to update to 3.0 because I need to work on Firefox and Selenium did not implement actions for FF).
My problem is: I try to open FF in private mode (I don't want to keep the cache because I ran a lot of FF instances)
For that, I use a FF profile and I have a certificate, so I accept it.
My code is :
FirefoxDriverManager.getInstance().setup();
capabilities.setBrowserName("firefox");
capabilities.setVersion("46");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffProfile = profile.getProfile("default");
ffProfile.setPreference("browser.private.browsing.autostart", true);
ffProfile.setPreference("browser.privatebrowsing.autostart", true);
//accept the certificate
ffProfile.setAcceptUntrustedCertificates(true);
ffProfile.setAssumeUntrustedCertificateIssuer(false);
capabilities.setCapability(FirefoxDriver.PROFILE, ffProfile);
WebDriver webDriver = new FirefoxDriver();
I tried "browser.private.browsing.autostart"
and "browser.privatebrowsing.autostart"
because when I did about:config in firefox, i found this two.
I did not received any error, firefox run my test but not in private. Do you have any idea? I found this post but it haven't have answer.