How to run test on specific browser by selenium grid How to run test on specific browser by selenium grid selenium selenium

How to run test on specific browser by selenium grid


Selenium Grid Installation Process:-

  1. Download Selenium server standalone jar file in which you want tocreate Hub
  2. Create a new java project and add it to build path

Start the Hub Using Below Command in your machine:-

  1. java -jar selenium-server-standalone-3.9.1.jar –role hub -port 4446

  2. Open ip address/grid/console in host browser "or" localhost: portnumber/grid/console

Start the Node Using Below Command in another machine:

  1. Download Selenium server standalone jar file in another laptop

  2. it is not necessary that node contains eclipse. But Java Should be installed.

  3. go to file path where selenium standalone is kept

  4. Type Below command

  5. java -jar selenium-server-standalone-3.9.1.jar –role webdriver –hub ipaddress/grid/register –port 5566

(but Here your test will fail because here file path for chrome Driver or gecko driver is not provided in the hub.)

  1. java –Dwebdriver.chrome.driver="provide path for chrome driver" -jar selenium-server-standalone-3.9.1.jar –role webdriver –hub ipaddress/grid/register –port 5566


I would suggest that you do the following

  • Create a node configuration file as seen here, wherein for the WINDOWS7 node, you specify the appropriate platform (make sure you pick a value from here)
  • Now you start off the node by specifying this newly created nodeConfig json using the command line parameter -nodeConfig node.json ( For more details refer to my blog post here )

Now based on the PLATFORM capabilities specified by your test, it would be routed to the appropriate node.


You need to tweak the commands for registering the nodes as follows :

  • Register node on Windows 7:

    java -Dwebdriver.chrome.driver=chromedriver_2.33.exe -jar selenium-server-standalone-3.7.1.jar -role node -hub http://localhost:4444/grid/register
  • Register node on Windows 10:

    java -Dwebdriver.chrome.driver=chromedriver_2.33.exe -jar selenium-server-standalone-3.7.1.jar -role node -hub http://localhost:4444/grid/register