Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Selenium to test on multiple versions of browsers

I was wondering if anyone is familiar with testing different browser versions using selenium. I know that you can specify which browser to test (using *firefox or *iexplore) but what if I had multiple versions of firefox or IE installed and I wanted a test to launch a specific web browser version, such that one test would run IE7 and another might run against IE8.

Currently, my tests will always run against whatever default browser version I have installed. I realize if I had selenium running on multiple machines each one of those boxes could have a different browser version and that would solve my problem but I'd like to know if what I'm asking (multiple browser versions on one machine) is possible.

Thanks.

like image 727
Ali Avatar asked Dec 14 '10 23:12

Ali


2 Answers

Actually you cannot have so much different versions of browsers on one machine - you cannot have different IE versions at the same time. IETester is an option, but is not as good as having virtual machines with different versions of IE and FF.

Anyway the best approach to this is to use different machines - either real or virtual

like image 174
Sergii Pozharov Avatar answered Oct 13 '22 11:10

Sergii Pozharov


You can pass an additional argument that is the full path to the browser binary. But, most browsers are picky about having multiple versions installed, many don't even allow it. In that case, you really need separate machines running each environment that you need. Selenium Grid is an excellent option here. We use it to test in IE6, IE7, IE8, FF, & Chrome right now. Each test specifies what environment it wants and that gets mapped back to a launcher on a particular machine.

like image 25
nirvdrum Avatar answered Oct 13 '22 10:10

nirvdrum