Superfast and Reliable Automation Testing Platform

Try Now
×
×
×
×

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.

Versions

versionUp

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:

  • 2.0 Supports both Selenium RC and WebDriver Scripts (vs. 1.0 which supports only Selenium RC)
  • In 2.0 we can automate up to 5 browsers (vs. 1.0 support only 1 browser per remote)
  • 2.0 does not need Apache Ant (vs. 1.0 where Apache Ant is mandatory)

Installation

The installation of Selenium GRID is very simple with minimal software requirements. It primarily needs only two things:

  1. Java
  2. Selenium Server jar (https://selenium.dev/downloads/)

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>.

Debugging

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

Conclusion

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.

Spread the love

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

AT&T's Success Formula: Download Our Whitepaper Now!


Search By Category

Test Smarter, Not Harder: Get Your Free Trial Today!

Start Free Trial