I wrote some Selenium tests a while ago for one of our web based applications, and these tests were working fine until I applied a self-verified SSL certificate to the site (the final version will have a proper certificate, but I just wanted to test it locally). This caused me a little bit of head scratching and googling until I found out about firefox profiles and how to create a new profile just for my selenium scripts to consume (cutting the profile down to the 2 files as recommended in this article)My selenium scripts had been working on the theory that I'd already started the selenium server, i.e. relying on me running a .bat file containing java -jar "C:\Program Files\SeleniumServer\selenium-remote-control-1.0.1\selenium-server-1.0.1\selenium-server.jar" but after reading this article I changed my project to use the SeleniumTestBase code example which allows me to use the firefoxProfileTemplate argument to tell firefox which profile to run under. All of my tests now inherit from SeleniumTestBase and the selenium server starts as part of the test which feels a lot cleaner. Oh, and the tests over the self-verified SSL certificate work too.
comments powered by Disqus