Can't get capabilities/profile for firefox set so that it ignores certificates and goes to my url

69 views
Skip to first unread message

Amy Reitmeyer

unread,
Mar 21, 2017, 10:30:52 PM3/21/17
to Selenium Users
Selenium 3.3.1, firefox 52.0.1  and gecko driver 15

I have code like this - everything I've read points to setting the profile values below, but when the browser loads the url, I don't get past the certificate page.

        RemoteWebDriver firefoxDriver = null;
        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
        FirefoxProfile fp = new FirefoxProfile();
        fp.setAcceptUntrustedCertificates(true);
        fp.setAssumeUntrustedCertificateIssuer(false);
        capabilities.setCapability(FirefoxDriver.PROFILE, fp);
firefoxDriver = new FirefoxDriver(capabilities);


The error looks like this - it doesn't appear that the capabilities is getting the parameters I'm sending - what am I doing wrong?

org.openqa.selenium.WebDriverException: 2017-03-21-20:21:09:419 
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'xxxxxx', ip: 'xxxxxx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\x\AppData\Local\Temp\rust_mozprofile.Qr0ivVh2M9i4, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0.1, platformVersion=6.1, moz:processID=12444, browserName=firefox, platformName=windows_nt}]
Session ID: 01134b23-6f95-4751-8374-31ffe7dddfa7
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'xxxxx', ip: 'xxxx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: driver.version: RemoteWebDriver
at java.lang.reflect.Constructor.newInstance(Constructor.java:437)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:99)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:43)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:325)

ankit shah

unread,
Mar 22, 2017, 1:24:20 AM3/22/17
to Selenium Users
Hi Amy,

There is problem in latest gecko driver.
Workaround for this is you can create Firefox profile manually and add certificate inside that profile.

While running script,invoke that profile inside your code.

Regards,
Ankit

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/47d5faf6-50dd-4f42-8fcb-a76cdeaff70a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages