Testing Selenium HTTPs Trust All certificates that work for FF but not IE

I played an arch with functional testing using Selenium RC.

I am having problems when the test goes to the login page of our website and switches to HTTPS.

I continue to change the settings, but each browser is disconnected from work.

Using ** iehta * and ** chrome * as my browsers and trusted SSL certificates and providing clean session settings, I can get FF3 to log in to our site, but IE throws the message "There is a problem with this website security certificate." error. (I installed the certificate)

Why doesn’t trust all certificates work with IE?

+4
source share
6 answers

There are two steps. One of them is to start the server with the "-trustAllSSLCertificates" parameter, and the other is to configure the browser to use the Selenium server as its proxy. * iexploreproxy and * firefoxproxy handle the proxy settings for you. Selenium (starting with version 2.0a5) will automatically configure * firefox to use the Selenium server as a proxy server if the "-trustAllSSLCertificates" flag is used. * iexplore, using HTA, Selenium is never configured to use a proxy. Thus, you need to handle this a priori or through a custom launcher.

More details in the following article: http://nirvdrum.com/2010/04/13/how-to-accept-self-signed-ssl-certificates-in-selenium.html

+6
source

I managed to get this to work by setting -trustAllSSLCertificates and creating a default profile in FireFox.

Until now, I can happily use any browser without fear of errors with an unreliable certificate.

It is worth noting that the browsers that I say use selenium is just * chrome and * iehta.

+1
source

I did not see this error with the latest version of Selenium RC ie 2.31.0 . And if you use:

 RemoteControlConfiguration rc= new RemoteControlConfiguration(); rc.trustAllSSLCertificates(); SeleniumServer server; server=new SeleniumServer(rc); 
+1
source

For some random reason, IE now seems fine, so I stick with the configuration as is and try to sort the FF issues.

0
source

This answer does not directly answer β€œWhy does it not trust all certificates to work with IE?”, However, it offers an answer to a question that probably caused the question asked here. that is, for those who run Selenium as a Windows service and find that they do not trust their self-signed certificates.

Problem

IE does not trust the root directory and issues self-signed authority certificates and therefore presents a page asking the user to decide if he wants to continue and trust the site. This prevents the progression of any selenium tests.

Decision

The solution is relatively simple and logical in concept, root and issuing certificates must be installed on the computer as trusted certificates.

However, the difficulty lies in the fact that the Windows Service running Selenium RC trusts certificates if the service runs under a system account. To fix this, follow these steps.

  • Install the root certificate as a public trusted certificate authority.
  • Install an issuance certificate as an intermediate certification authority for the entire organization.

Adding certificates to the trusted root certificate authority store for the local computer

Administrators are the minimum group membership required to complete this procedure.

To add certificates to the trusted root certificate authority store for the local computer

  • Click Start, select Start Search, type mmc and press Enter.
  • From the File menu, select Add / Remove Snap-In.
  • Under Available snap-ins, select Certificates, and then click Add.
  • In this snap-in, certificates will always be processed, click on the computer account and click "Next".
  • Click "Local Computer" and click "Finish."
  • If you no longer have snap-ins to add to the console, click OK.
  • In the console tree, double-click Certificates.
  • Right-click the Trusted Root Certification Authorities repository.
  • Click Import to import the certificates and follow the instructions in the Import Certificate Wizard.

Adding certificates to the intermediate certificate store for the local computer

  • In the console tree, double-click Certificates.
  • Right-click the intermediate certificate store.
  • Click Import to import the certificates and follow the instructions in the Import Certificate Wizard.
0
source

IE displays the certificate error as a regular html page. Since it does this, you can find the element and make .click () on it as a temporary workaround. :) You can simply create a certificate helper class for this and just execute cert.acceptCert (driver);

0
source

All Articles