My friends and family are under attack in Ukraine.
Donate to protect them directly or help international organizations.

Selenium 2: Wrong Browser Launched

June 20th, 2012

I have a test suite with PHPUnit and Selenium. I recently upgraded to Selenium 2 (Selenium WebDriver) and updated my PHP code. I specified explicitly in my code that Firefox should be used but the tests consistently opened Chrome instead.

The error did not come from the fact that I incorrectly updated my code. You see, with Selenium 1 test cases, browsers were defined like this: *firefox. With Selenium 2, you have to drop the asterisk like this: firefox. Otherwise, your system's default browser will be used.

That's it. Happy testing!

Previous: Deleting From Self-Referencing Tables Next: How to Improve Open Source Software’s Documentation