1.

How to configure the Node?

Answer»

Nodes are host machines on which the TESTS are RUN. These tests are launched by the Hub. Hub can launch ONE or more nodes on remote machines or on the same machine where Hub is located. Node executes tests you loaded on the hub.

To configure nodes, you need to download the Jar files on the Node machines and place it on any directory of CONVENIENCE. Open windows command prompt and execute below command-

java-DWebDriver.chrome.driver=C:chromedriver.exe -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.2.11:4444/grid/register 

To set a Node on the same machine as you Hub, you need to open another command prompt other than Hub prompt.

  • DWebDriver.chrome.driver=C:chromedriver.exe is used to set the browser driver path. 
  • role node flag used to set a particular host machine as a node.
  • hub http://192.168.2.11:4444/grid/register directs Node to connect with Hub using Hub's IP address. If you want to launch a Node on the same machine as your HUb, then you can specify ‘-hub http://localhost:4444/grid/register‘ in the command.

To check Nodes are registered, open and browser and navigate to http://localhost:4444/grid/console. Once Selenium Grid is CONFIGURED, you can proceed with the test script execution on Nodes.



Discussion

No Comment Found