Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium and HTTPS/SSL

I'm running selenium-rc 1.0.3 on a Mac OS X & Windows 7 and both seem to be giving my the annoying accept cert error in firefox. In reading the docs they say I should be able to just use the *firefox run mode and rc should take care of it for me via a proxy or something, but this appears to not work. The only solution that I was able to find on the internet was to create a skeleton profile and pass the path into the rc startup, but thats not a real option. As that doesn't solve problems of testing in IE/Chrome/Safari. Does any know of any other solution that will work.

Selenium-RC docs on HTTPS - http://seleniumhq.org/docs/05_selenium_rc.html#handling-https-and-security-popups

like image 642
NerdyNick Avatar asked Mar 09 '10 00:03

NerdyNick


People also ask

How will you handle SSL certificate in Selenium?

New Selenium IDE We can handle SSL certificate with Selenium webdriver in Chrome browser. A SSL is the standardized protocol used to create a connection between the browser and server. The information exchanged via a SSL certificate is encrypted and it verifies if the information is sent to the correct server.

What are the 3 types of SSL?

There are three recognized categories of SSL certificate authentication types: Extended Validation (EV) Organization Validation (OV) Domain Validation (DV)


2 Answers

I have tried the solution given by this article (Thanks elliot) and it works well for me! Basically

1. Create a firefox profile:

a. Starting your firefox -ProfileManager (or firefox -P) in cmd.exe (make sure the firefox installation folder path is in your path environment variable, by default it should be just created when you installed firefox) and create a new profile.

b. Select this new profile to browse to the HTTPS URL and accept the self-signed certificate when prompted.

c. Go to the Firefox profile directory.

d. Delete everything in the directory except for the cert_override.txt and cert8.db files.

2. Run your selenium RC server using this profile:

such as java -jar selenium-server.jar -firefoxProfileTemplate c:/Firefox_Profile

like image 153
5 revs Avatar answered Sep 19 '22 16:09

5 revs


If this is an issue with self-signed certificates, you could try using the RCE plugin for Firefox in a custom profile: http://sejq.blogspot.com/2009/01/remember-certificate-exception.html

Internet Explorer's warnings can be disabled through the advanced settings (specifics depend on the version of IE). Worth Googling around for a solution.

For Google Chrome I believe this is an unresolved issue related to: http://code.google.com/p/chromium/issues/detail?id=2010&can=5&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS

like image 41
Dave Hunt Avatar answered Sep 18 '22 16:09

Dave Hunt