Ulaga Sundar Ulaga Sundar - 1 year ago 84
Java Question

Can not open Multiple Browser by using selenium grid

I am new to selenium grid. I want to do testing in parallel mode. I tried as like following. But it won't open the multiple browsers. I don't know what I have done wrongly.

My Code :

for(int i=0;i<=10;i++){
RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), DesiredCapabilities.firefox());

Selenium Hub:

java -jar selenium-server-standalone-2.52.0.jar -role hub

Selenium Node:

java -jar selenium-server-standalone-2.52.0.jar -role node -hub http://localhost:4444/grid/register -port 5560 -browser browserName=firefox,maxInstance=3 -maxSession 3

Info Prints in Hub :

16:38:28.581 INFO - Available nodes: []

16:38:28.581 INFO - Trying to create a new session on node


Answer Source

I have found the solution for this. I only did the mistake in the command.

I should used maxInstance instead of maxInstances

The command should be like this

java -jar selenium-server-standalone-2.52.0.jar -role node -hub http://localhost:4444/grid/register -port 5580 -browser browserName=firefox,maxInstances=3 -maxSession=3
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download