!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: How to setAcceptUntrustedCertificates for Grid firefox profile  (Read 1669 times)

shi junjuan@gmail.com

  • Web User
I want to run my test case in Grid mode with firefox browser. But it
 will failed because it can’t bypass the untrusted certificate.
 I use setAcceptUntrustedCertificates(true) to resolve this problem for
 FireFoxDriver. But how can I trick the RemoteWebDriver?
 
I tried capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS,
 true), but it doesn’t work.
 
Does anyone know how to handle this situation?

Simon Stewart

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #1 on: May 17, 2012, 08:59:40 PM »
Use a firefox profile:
 FirefoxProfile profile = new FirefoxProfile();
 profile.setAcceptUntrustedCertificates(true);
 DesiredCapabilities caps = DesiredCapabilities.firefox();
 caps.setCapability(FirefoxDriver.PROFILE, profile);
 
And then use those desired capabilities to create the remote webdriver.
 
Regards,
 
Simon
 
On Mon, Jul 11, 2011 at 4:15 AM, shi junj...@gmail.com
 

- Show quoted text -

shi junjuan

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #2 on: May 17, 2012, 08:59:55 PM »
It doesn't work for me. Is it a bug?
 
On Mon, Jul 11, 2011 at 1:40 AM, Simon Stewart <simon.m.stew...@gmail.com>wrote:
 

- Show quoted text -

Selenium Webdriver

Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #2 on: May 17, 2012, 08:59:55 PM »

Krishnan Mahadevan

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #3 on: May 17, 2012, 09:00:11 PM »
As Simon pointed out, the following does work for me and I have had no
 issues.
 
*DesiredCapabilities capability = new DesiredCapabilities();
 capability.setBrowserName(DesiredCapabilities.firefox().getBrowserName());
 
FirefoxProfile profile = new FirefoxProfile();
 capability.setCapability(FirefoxDriver.PROFILE, profile);
 capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
 WebDriver driver = new RemoteWebDriver(url, capability)
 *
 I work with firefox 3.6.15 and make use of the recently release
 selenium-standalone-2.0.0.jar
 
Thanks & Regards
 Krishnan Mahadevan
 
"All the desirable things in life are either illegal, expensive, fattening
 or in love with someone else!"
 

- Show quoted text -

shi junjuan

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #4 on: May 17, 2012, 09:00:27 PM »
I tried, but it's the same. I'm using selenium-standalone-2.0.0.jar
 
On Wed, Jul 13, 2011 at 12:49 AM, Krishnan Mahadevan <
 

- Show quoted text -

Krishnan Mahadevan

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #5 on: May 17, 2012, 09:00:44 PM »
That is totally weird. The reason behind me saying that is because, all of
 our test environments by default has certificate error exceptions and this
 is the method that I use to by pass those exceptions in WebDriver.
 
Within selenium1 its a totally different story (XHR errors that show up)
 
Thanks & Regards
 Krishnan Mahadevan
 
"All the desirable things in life are either illegal, expensive, fattening
 or in love with someone else!"
 

- Show quoted text -

Pavithra

  • Web User
Re: How to setAcceptUntrustedCertificates for Grid firefox profile
« Reply #6 on: May 17, 2012, 09:01:03 PM »
I used below and it worked out for me:
 
FirefoxProfile firefoxprofile = new FirefoxProfile();
             firefoxprofile.setAssumeUntrustedCertificateIssuer(false);
 
            capability = DesiredCapabilities.firefox();
             capability.setCapability(FirefoxDriver.PROFILE, firefoxprofile);
 
Cheers,
 Pavithra
 

- Show quoted text -

 ... read more »

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1198 Views
Last post April 11, 2012, 02:50:35 PM
by SeleniuMaddog
2 Replies
1664 Views
Last post September 26, 2012, 10:01:05 AM
by webTester
0 Replies
696 Views
Last post January 09, 2013, 05:45:49 AM
by sudhir
0 Replies
486 Views
Last post January 17, 2013, 09:03:51 PM
by SeleniumWebdriver Admin
0 Replies
501 Views
Last post March 06, 2013, 05:51:39 AM
by jal
0 Replies
558 Views
Last post June 18, 2013, 03:55:43 PM
by tdoan
9 Replies
698 Views
Last post January 27, 2014, 03:32:59 AM
by Murthi