Home » Software Testing » Automation Testing » Selenium Grid Tutorial » Selenium Grid Tutorial: Playing with node registration parameters in grid
Selenium Grid console with Configuration detail

Selenium Grid Tutorial: Playing with node registration parameters in grid

As we have seen in previous post Selenium Grid Tutorial : Setting up hub and nodesWe have seen how to setup hub and nodes. But in this post we are going to see various parameters that is used in node setup to take optimum benefit of resources as per our need and availability.

So lets see all the parameters and their use one after another..

-port : In general understand it as an address for specific process and this helps to understand which process is being listened at which port.

By default node registered on port 5555 if port parameters is not defined in registering a node with hub.
So lets see how to provided any port number as per our need But before running this command reach to the folder/location where you have kept your selenium standalone jar in your computer and here node is being executed on the same machine just by opening another terminal so here we have taken http://localhost:4444

In above example, -port is being followed by 5557 and by doing so we have assigned port 5557 to this node.

This can be seen whether node has beed registered with hub with port 5557 or not just by opening console on following URL http://localhost:4444/grid/console (Note: by default hub takes 4444 as port)
If node would have been registered then it will be visible on grid console like this

Selenium Grid Console with port parameter

Here you can see 5 instance of Firefox, 5 Instance of Chrome and 1 Instance of IE browser by default if we have not provided any custom parameter.

But if we want to see more configuration detail about the registered node then click on Configuration  tab.
So here is the screenshot of Configuration tab
Selenium Grid console with Configuration detail-browser :  This parameter is used to do the custom session of various browser. Suppose we want only firefox or chrome or ie browser then this parameter can be used like this 

But above command would register only one instance of Firefox  like this
-browser parameterSo in the same fashion if we want to use only chrome then above command would be like this

and for IE browser place iexplore in place of chrome/firefox in above command

maxInstances: it tells how many number of browser instance could be used from registered node. 

So in above command that we have seen for -browser parameter, if we want to increase the number of instance more than default 1 to 5 then we need to use one more parameter maxInstances followed by browser name. Like this

Above command would register three instance of Firefox browser from node to Hub and it would look like this

Selenium Grid with 3 instance of Firefox

Note: In this example node is on separate machine that is why IP is different from previous snapshot

maxSession: This parameter tell us how many number of remote session can be establish simultaneously.

version  and platform:  we can also give these two parameter as well but in most of the cases grid make decision which platform and version of browser is present on node. So if you want to mention it explicitly at the registration of node then its good but if you don’t then this is not going to make any difference. so lets see one example of these two parameter as well

in above example we are registering a firefox browser of version 40.0 from Linux machine.

Setting path of third party binaries in Selenium grid(mainly for Chrome,IE )
But before that lets see one exception on node which have already registered Chrome browser with Hub.
exception seems like this

So here is the solution to execute your remote-webdriver test on one node with Chrome browser.

so above command will help you out to resolve your chrome related issue.

So lets see some more commands with various combination of browser with various instances and sessions

Command 1:  For one IE, 1 Chrome and 1Firefox instances from some node so it would look like this

 Command 2: For 2 instance of IE , 10 instances of Firefox and 7 instance of Chrome(please forgive me since i am going to run this on mac or linux machines since i don’t have my windows machine with me right now)
But always remember we are not talking about default browser session so rememebr it will be five and not more than that we can run at a time on any node without any customisation.

Note: give path of chromedriver without any single or double quote in above command like this
For Chrome
-Dwebdriver.chrome.driver= E:/chromedriver.exe

For IE
-Dwebdriver.ie.driver=E:/<ie driver exe>

Command 3: Use command 2 with custom session that should be sum of (10+7+2)

Note: add third-party executable in above if you are not using Unix core machines(because in that case, you have already kept this binary in lib folder so in that case you don’t need. To read more about setting the path in mac or other Unix kernel machine read following post  Installing ChromeDriver on Mac.

4 thoughts on “Selenium Grid Tutorial: Playing with node registration parameters in grid”

  1. Pingback: Testing Bits – 1/17/16 – 1/23/16 | Testing Curator Blog

  2. Pingback: Selenium Grid Tutorial: Writing first script for Grid using RemoteWebDriver - Abode QA

  3. Pingback: Selenium Grid Tutorial: running hub and nodes using json - Abode QA

  4. can any one help me to run a test script in two system in windows 8.1 using selinium grid,with details about command prompt instructions in a step wise manner.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
%d bloggers like this: