Selenium has been going through constant improvements. In the following sections, we have explained the difference in the two major versions of Selenium GRID (Version 1.0 and 2.0). Also, installation and Debugging steps are described for Hub and Node.
Earlier version of Selenium GRID was Selenium 1.0 (Selenium RC), whereas the commonly used latest version is Selenium 2.0 which comprises of Selenium RC &WebDriver. Following are some benefits of Selenium Grid 2.0 over 1.0:
The installation of Selenium GRID is very simple with minimal software requirements. It primarily needs only two things:
On Hub:Run following command: “java –jar <selenium server standalone.jar> -port <port number> -role hub ” (by default port 4444 is used in case port is not specified in the command). Successful execution results in an Info message saying “Selenium Grid hub is up and running”.
On Node(s): In order to register hub machine with node, run following command: “java –jar <name of selenium server.jar> -role node -hub http://<hubip: port>/grid/register”. Successful execution results in an Info message saying “The node is registered to the hub and ready to use”. Also, the following message appears on the hub “Registered a node <node ip>.
Following two ways are most commonly used for debugging:
1. In order to log system messages, one can specify a log file. All that needs to be done is to start Hub or Node with the ‘–log’ parameter. Command looks like:
java -jar selenium-server-standalone.jar -role hub -log logs.txt
2. In order to see debug logs on console, one can specify –debug parameter. Command looks like:
java -jar selenium-server-standalone.jar -role hub -debug
We recommend usage of Selenium GRID Version 2.0 because of the benefits highlighted. Also, feel free to book a demo of Webomates CQ which enables you to do all this at the click of a button because of our SAAS based service model.
Tags: How to install selenium grid, Selenium Grid, versions of selenium grid
Test Smarter, Not Harder: Get Your Free Trial Today!
Start Free Trial
Leave a Reply