2

My scenario is, I will launch a instance of a browser and perform some operations and then without closing current browser new browser of same type will be opened and verification needs to be done.

Webdriver driver = driverInitialize.getDriver();
//Perform some operations
Webdriver driver2 = driverInitialize.getDriver();
//Perform some operations

The problem is only with firefox and IE as second instance of browser is not getting launched till the timeout of first instance happens but the same works fine with chrome browser. On launching the node and hub, for firefox and IE it says "WARN - Max instance not specified. Using default = 1" even after specifying the maximum instance in the respective nodes. The commands used for launching hub and node is presented below

Hub : java -jar selenium-server-standalone-2.44.0.jar -role hub -port 4444

Firefox Node : java -jar selenium-server-standalone-2.44.0.jar -role node -hub http://127.0.0.1:4444/grid/register -port 5553 -browser browserName=firefox,maxInstance=5 -Dwebdriver.version="30"

IE Node : java -jar selenium-server-standalone-2.44.0.jar -role webdriver -hub http://127.0.0.1:4444/grid/register -port 5555 browserName=ie,maxInstance=5 -Dwebdriver.ie.driver="C:\IEDriverServer.exe"

Chrome Node : java -jar selenium-server-standalone-2.44.0.jar -role webdriver -hub http://127.0.0.1:4444/grid/register -port 5555 browserName=chrome maxInstance=5 -Dwebdriver.chrome.driver="C:\chromedriver.exe" 

Versions of browser

Chrome : 40.0.2214.115; Firefox : 34.0; IE : 10.0.9200.17228;

Deva
  • 21
  • 1
  • 2
  • 6
  • `-role webdriver`? Use `-role node` instead, `-role webdriver` is used just for backwards compatibility. You want to use IE and Chrome on one node and FF on another? You have port 5553 for FF and 5555 for IE and Chrome. Could you share realization of class for driverInitialize What is number of sessions ('maxSession') for your node? Maybe you have only one session? – RocketRaccoon Mar 11 '15 at 20:08

1 Answers1

1

I think you should take a look at this stack overflow question: Selenium Grid: MaxSessions vs MaxInstances

Max sessions will override max instances, so you need to set both. If you have max sessions = 1 and max instances = 10, only 1 test will be allowed to run. Check your configuration in this case.

You can also see these options on the Grid 2 wiki: https://code.google.com/p/selenium/wiki/Grid2

EDIT** This has moved to: https://github.com/SeleniumHQ/selenium/wiki/Grid2

Community
  • 1
  • 1
Michiel Bugher
  • 1,005
  • 1
  • 7
  • 23