Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
203 views
in Selenium by
retagged by
Can you explain in brief how to do selenium grid node setup?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
The grid can be formed by setting up hub and nodes.
 
Hub: Hub is a computer or a server which will handle nodes. The client will be pointing to the hub URL using RemoteWebDriver class.
Typical example of the hub URL. http://<yourIP>:4444/wd/hub
The hub can be initiated by using below command.
 
java -jar selenium-standalone-<version>.jar -role hub
 
Once the hub is started sucessfully, you can navigate to http://<yourIP>:4444 and you should see the page with information about the grid server and other connected nodes.

 

Node: The node is a computer or a server which will host the set of browsers and connect with the hub to receive commands from the hub.
The node can be initiated with below command.
 
java -jar selenium-standalone-<version>.jar -role node -hub http://<yourIP>:4444/grid/register
 
Once node is initiated and connected to the grid, you can navigatae to http://<yourIP>:4444 on your browser and you should see the node information and browsers information. You can even specify the browser configuration to the node using -browser argument such as browserName, browserVersion, operating system, number of browser sessions, etc.  You can connect as many nodes you want to the hub. 
 
You can anytime navigate to http://<yourIP>:4444 on your browser to see number of nodes connected, browser configuration of each hosted browser and the grid information.
 
Based on the browser configuration you provide via DesiredCapabilites to the RemoteWebDriver class, the hub will forward session to that node.
 
Hope that helps!

 


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...