Currently Browsing

Posts Tagged ‘ Parallel ’

How to run parallel tests with Selenium WebDriver and TestNG in Chrome browser and in Internet Explorer browser

In the previous lesson(How to run parallel tests with Selenium WebDriver and TestNG) we used Firefox browser to run the tests.
Now we introduce how to run the tests parallel in Chrome and in Internet Explorer browsers.

Firstly download the latest chromedriver and IEDriverServer files.
You can download the IEDriverServer file from the site. My opinion is that use the 32-bit version, because the 64-bit version is in some cases are too slow.
The chromedriver download site is .
In this case my opinion is that use the chromedriver_win_26.0.xxxx version (this version is released in Jan 2013). There are newer versions, like chromedriver_win32_2.1 (Jul 9 2013) and maybe this version is good, but the previous versions, like 2.0, are not worked perfectly.

Put the downloaded and unzipped files to a folder.
In Advanced system settings/ Environment Variables update the Path:
In to the Path variable add:
–    The location of the two file (in my case):      C:\SeleniumDrivers;

If you want to use Chrome browser, follow the steps:
Now (as in the previous lesson) open command prompt (with administrator privileges).
Go to c:\ and enter the following line to start Selenium Grid:
java -jar selenium-server-standalone-2.33.0.jar -role hub -port 4444
Open a new command prompt window, go to c:\ and enter the following line to register the browser to the Selenium Grid:
java -jar selenium-server-standalone-2.33.0.jar -role node -hub http://localhost:4444/grid/register -browser browserName=chrome,maxInstances=3
Here is the code for it: