How To Open Multiple Instances Of Different Browsers Through Selenium

Share and Enjoy !

Testing websites through selenium is a hotcake now days. It is also equally important to check how the site looks like in different browsers. Till date the process of such checking were first set the target as IE browser then check and again set the target as Chrome and then Firefox etc The advancement in technology made the possibilities to check them in parallel. For such thing we don’t need to  change our testing approach in a big way. It is only change in the starting of the test.

We need to start 3/4 browsers at the beginning of each test. This post will show how to open 3/4 browsers and 3/4 instance of each browsers at the beginning of the test.It is all about a command to open such possibilities.

-jar selenium-server-standalone-2.38.0.jar -role node
-hub -port 5556
-browser browserName=firefox,maxInstances=4
-browser browserName=chrome,maxInstances=4
-browser browserName=iexplorer,maxInstances=4
-browser browserName=safari,maxInstances=4 -maxSession 6

Now the things you require..

  • Chrome driver
  • IE driver
  • Firefox driver
[32/64 bit depending on your test machine configuration]
you need to provide the correct path for the same.
hope that helps!!

Share and Enjoy !

Leave a Reply

Your email address will not be published. Required fields are marked *