I have some Selenium 2 WebDriver test cases for Firefox and Internet Explorer 9. When I access HTTPS URLs on IE9 (Windows 7 64bit) I get:

There is a problem with this website's security certificate.

At this point the test hangs and eventually fails.

I tried:

Getting Selenium to click on the "Continue to this website (not recommended)." link. This can't be done as this error page is not your usual page. Same with JavaScript - it doesn't execute.

I tried adding the registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_ERROR_PAGE_BYPASS_ZONE_CHECK_FOR_HTTPS_KB954312) that prevents the certificate-error-page from displaying - didn't work. Probably because I'm on Windows 7 with IE9.

Following this advice I tried using BrowserMob proxy, but there's very little documentation out there and I couldn't work it out.

Finally, I don't have admin access to my PC - e.g. no access to group policies. Selenium 2 WebDriver works fine on Firefox. I have all security zones enabled in IE Internet Options and if I run the tests on other URLs (HTTP) then there is no problem.

Has anyone got a solution to this problem? Does anyone know hot to use BrowserMob proxy (or any other proxy) effectively to overcome this issue?

Did you ever find a solution for this? I have similar issues using watir-webdriver against IE as do others. It seems to be a webdriver issue. caused by something strange about that page.
–
Chuck van der LindenNov 10 '11 at 0:12

8 Answers
8

There's a couple of solutions depending on how your particular company is set up. The easiest is if the machine that you're running the tests from is on the same domain as the server where the site is hosted. Have the team that manages the server to create a self-signed certificate and have the cert added to your machine.
If the self-signed route doesn't work, you'll probably have to have another team involved. If there is someone who is able to issue a certificate from your production certificate authority, have them create and add to your test server. Then, import the certificate to your machine.

Was wrestling with this particular problem for months before our network and infrastructure teams heard about it and offered to help out.

I'll investigate and let you know how it went. Tried to up-vote you, but I have too few reputation points.. lol. Many thanks.
–
damo_incOct 11 '11 at 6:46

2

Self-signing I have found is the best solution in many of these scenarios, I did get the Security Exception add-ons for FF and IE8 to get around this in my environment. Have yet to try IE9 in my environment but I'm hoping it will be the same.
–
MichaelFOct 11 '11 at 20:33