Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

howto run together multiple instance of selenium browser

Is it possible to run together multiple instance of selenium browsers and each one will work for themselve which will increase speed?

i can run one like:

ISelenium selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://localhost/");
selenium.Start();

but how to open more of them and open page inside each one?

like image 570
senzacionale Avatar asked Jul 31 '11 14:07

senzacionale


People also ask

How do I run multiple instances of Selenium?

You can invoke multiple browser sessions by just creating multiple driver objects, and managing them. Each session will be separate if you want them to be. Grid is for scaling as there is a limitation on the no of browser instances you can run keeping your machine performance intact and tests stable.

Does Selenium support multiple browsers?

With Selenium, test execution remains seamless on just about all available browsers. Selenium RC and Webdriver may be used with just about all available browsers, including Internet Explorer, Mozilla Firefox, Google Chrome, Safari and Opera.


1 Answers

Check Selenium Grid:

(..) Stop waiting hours to get the results of your web acceptance builds! Selenium Grid transparently distribute your tests on multiple machines so that you can run your tests in parallel, (..) this will dramatically speeds up in-browser web testing

Getting started it's very easy (http://selenium-grid.seleniumhq.org/get_started.html) and demo site is present too.

like image 87
boj Avatar answered Nov 15 '22 04:11

boj