Saturday, August 8, 2015

Making the settings for Selenium Grid

Making the settings for Selenium Grid 
You may need to look at these settings as there are couple of ways to do it.
1) From the command line itself when starting the grid node
2) By providing these settings in json/text file and using this in your grid node startup command.
The syntax ideally for command line is
Start Hub
java -jar selenium-server-standalone-2.47.1.jar -role hub
Start Node
java -jar selenium-server-standalone-2.47.1.jar -role node -hub http://SystemA:4444/grid/register
And for json config file
{
"capabilities":
[
{
"browserName": "firefox",
"version": "3.6",
"platform": "WINDOWS",
"maxInstances": 1
},
{
"browserName": "internet explorer",
"version": "8",
"platform": "WINDOWS",
"maxInstances": 1
}
],
"configuration":
{
"nodeTimeout":120,
"port":5555,
"Host":"SystemB",
"hubPort":4444,
"hubHost":"SystemA",
"nodePolling":2000,
"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":1,
}
}
And then provide this json file in your command line argument for starting node as
Start Node
java -jar selenium-server-standalone-2.47.1.jar -role node -hub http://SystemA:4444/grid/register -nodeConfig GridConfigFile.json
Remember the GridConfigFile.json file should be in same folder of your selenium grid file.
Making the settings exactly as mentioned, should start the selenium grid server and node like a charm :)
Check now if your settings are correct or not
Shoot this in your favouorate browser
ipaddress:port number i.e. 194.194.1.204:4444
You should see a page with Grid Console link
Clicking on the link should give you the list of nodes hooked to selenium server up and running.
You are good to go for test execution!!
Good luck and all the best.

Identifying element with css pseudo selector :nth-child()

Sharing a video on css pseudo selector :nth-child() for locating an element based on index of element among its siblings.

https://youtu.be/vmrf3lYRcqI