Ethan Barron
Ethan Barron

Reputation: 1304

Selenium-webdriver w/ Firefox -- SSL problems (Peer's certificate has an invalid signature.)

This is one of the strangest issues I've run across in quite some time.

We are using selenium-webdriver to drive an instance of Firefox, and part of our task is to visit an HTTPS page. However, upon attempting to do so, the page fails to load and reports that "the peer's certificate has an invalid signature".

Okay, not so strange, right? But here's where it gets kind of strange... the page loads absolutely fine if I open an instance of Firefox, myself, on the exact same box. So, how could this even be happening? Selenium is using the same firefox binary as I would use to browse the web, right?

If I'm not mistaken, Selenium simply builds a profile each time it's used. Please let me know if this is incorrect. My guess, here, is that it is setting some option or something, somewhere, at the time the browser is loaded, and that this is causing this issue to appear through Selenium, but not when I use Firefox manually.

I'm completely at a loss on this one. Does anyone have any clues or information?

Upvotes: 0

Views: 371

Answers (2)

Ethan Barron
Ethan Barron

Reputation: 1304

I solved this problem with the Ruby gem "certified".

Upvotes: 0

Vijay Prasath
Vijay Prasath

Reputation: 11

You can solve this by creating Firefox profile and setting up the desired capabilities

FirefoxProfile fp = new FirefoxProfile();
DesiredCapabilities dc = new DesiredCapabilities.Firefox();
dc.SetCapability(FirefoxDriver.PROFILE,fp);
WebDriver driver = new RemoteWebdriver(dc); 

Upvotes: 1

Related Questions