robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

Documentation enhancement do describe how to handle self signed certificates #82

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by @rgnyman on 3 Feb 2010

Solution copied from http://townx.org/blog/elliot/dealing-self-signed-ssl-certificates-when-running-selenium-server-firefox

  1. Close down any running Firefox instances.
  2. Start Firefox (the one you're going to run your tests with) with the profile manager: firefox -ProfileManager
  3. Create a new profile. You'll be prompted to choose a directory for the profile. Put it somewhere inside the project where you're writing the tests.
  4. Select the profile and run Firefox using it.
  5. Browse to the HTTPS URL (with self-signed certificate) you're going to be testing against.
  6. Accept the self-signed certificate when prompted. This creates an exception for it in the profile.
  7. Close the browser.
  8. Go to the Firefox profile directory.
  9. Delete everything in the directory except for the cert_override.txt and cert8.db files.
    1. When you run your Selenium server pass a -firefoxProfileTemplate /path/to/profile/dir argument to it. This tells Selenium to use your partial profile (with certificate exceptions) as a basis for minting its new profile. So you get the certificate exceptions, but without any of the other clutter you would get if you used a whole profile.

Example test

Setting Value Library SeleniumLibrary

Test Case Action Mytest Start Selenium Server -firefoxProfileTemplate /home/xx/firefoxprofile Open Browser
https://100.100.100.100/hostedOffice/ *firefox

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 3 Feb 2010

This is probably best documented in a separate wiki page. A link to it can be added to the keyword documentation if needed.

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 11 Feb 2010

Used my copy-paste and formatting fu: https://code.google.com/p/robotframework- seleniumlibrary/wiki/HandlingSelfSignedCertificates