Configuration in Selenium Grid – Selenium Webdriver Trainings

Configuration in Selenium Grid


Selenium is widely used across the world to test web-based applications. Selenium grid is a component of Selenium test automation suite which enables to run parallel testings concurrently to reduce the time required to complete the tests. Different tests can be executed simultaneously on different platforms and machines using Selenium Grid. This article discusses configuration in selenium grid.


Before configuring Selenium Grid, you must make it sure that you have completed the installation and configuration of java in your system. If not, the first step should be the installation of Java and the configuration of the same.


Now, let us start the configuration of Selenium Grid. Actually, Selenium grid consists of two parts, the hub, and the node. The portion of every Selenium training course about how to set up Selenium Grid will start with a brief explanation about these two parts.


Hub is the brain of Selenium grid which manages the machines on which the tests are being executed. The parameters for the tests will be provided to the hub and it will search for the nodes in the grid that matches the parameters and provide the duty to the nod for executing the test.


A Selenium grid can have one or more nodes but only one hub. All the nodes in a grid will be registered with the hub and the hub will have all the necessary information about the node. It will provide the tests to the nodes that match with the parameters of the tests.


Hub Configuration


  1. The first step will be to download the latest version of Selenium
  2. Now, store the Selenium Jar file at a convenient place in your hard drive.
  3. After opening the command prompt navigate to the location where the Selenium Jar files are stored.
  4. Type java -jar selenium-server-standalone-3.3.1.jar -role hub at the command prompt.
  5. Now, command to start Selenium driver and to give it the role of the hub.


Now the hub is ready to work. Here there are few things you should take note of specifically.


  • You should use the right version number at the command prompt.
  • The grid server will be running as long as you keep your command prompt open and when you close it the selenium server also will stop working.


Node Configuration


  1. Move to command prompt and type “IPCONFIG” to find out the IP address of the hub.
  2. If the node is set in the same machine there is no need to download and save Selenium Jar files but if the node is being set up in a different machine, there is a need to download Selenium.
  3. Open the command prompt. If the node is being set up on a different machine, you need to log on to that computer and to open the command prompt.
  4. Now type 3.3.1.jar -role node -hubhttp:// -port 5555 to register the node with the hub.
  5. After executing the command then return to the Hub and navigate the URL http://localhost:4444 or and the hub will now display the node which is attached to it.


Related posts

Leave a Comment