News Archive
PhpRiot Newsletter
Your Email Address:

More information

Selenium 2: Wrong Browser Launched

Note: This article was originally published at Planet PHP on 21 June 2012.
Planet PHP

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!