• Selenium Video Tutorials

Selenium - Components



Selenium Components are often referred to as a suite of Selenium tools. There are a total of four tools which are together called the Selenium Components. Let us discuss the various components of Selenium −

  • Selenium IDE

  • Selenium RC

  • Selenium Webdriver

  • Selenium Grid

Selenium IDE

Selenium Integrated Development Environment is an important part of the Selenium suite. It was first developed as a Firefox plugin, however now it is available in both Firefox and Chrome browser. Some of the features of Selenium IDE are listed below −

  • The recording, debugging, executing and editing of the functional tests can be done in Selenium IDE.

  • The scripts in Selenium IDE are developed in Selenese which is a scripting language in Selenium.

  • Selenium IDE commands help us to perform tasks like clicking a button or link, taking input in an edit box, obtaining a text from a webelement and so on.

  • Selenium IDE tests can be converted to formats like Java, C#, Python, TestNG, and so on. Its default format is in .html.

  • Selenium IDE tests can be exported and used in Selenium Webdriver and Selenium RC.

  • Selenium IDE does not require technical or programming knowledge. Hence it can be used only testing simple scenarios and not used to cover any complex use cases.

  • Selenium IDE does not give the feature of parameterization of tests for data driven testing.

  • Maintenance of objects and other reusable components are difficult in Selenium IDE, in case it is being used for complex testing projects.

Selenium Remote Control

Selenium Remote Control is a server implemented in Java. It can accept commands for browsers using the HTTP. Selenium RC has a Selenium RC server and a Selenium RC client. Selenium RC is outdated and it has been deprecated by Selenium.

Some of the features of Selenium RC are listed below −

  • Automation tests in Selenium RC can be developed in any programming languages like Java, Python, C#, and so on.

  • Selenium RC can be used to write automated tests for testing web applications.

  • Selenium RC comprises a proxy server which gives the provision to the browser to work as if that the application under test is available in the domain of the proxy server.

  • To initiate test execution, we have to create an instance of the Selenium RC server.

Selenium WebDriver

Selenium WebDriver (began from Selenium version 2 onwards) is the successor to Selenium RC which sends commands directly to the browser and retrieves results, hence it is faster than Selenium RC. It receives commands and passes them to the browser. This is done with the help of the browser drivers that sends commands to the browser and obtains the results.

Selenium version 2 combined the useful features of Selenium RC and Selenium Webdriver into Selenium Webdriver. Later on Selenium 3, added more features to Selenium Webdriver.

Some of the features of Selenium Webdriver are listed below −

  • Automation tests can be written in multiple programming languages like the Java, C#, Python, JavaScript, and so on.

  • Selenium webdriver supports browsers like Chrome, Firefox, Safari, IE, and so on.

  • Selenium webdriver works on more than one platforms like Windows, Mac, Linux, Android, and so on.

  • Headless execution can be achieved with the help of the HTMLUnit Driver.

  • Selenium webdriver does not require a server to initiate test execution and it communicates directly with the browser.

  • Selenium webdriver is open-source and comes without any licensing cost.

  • Selenium Webdriver does not have an IDE, hence it is time consuming to create test scripts.

  • Selenium Webdriver supports only web based applications.

  • Selenium Webdriver has no support to automate QR, captcha and barcode scenarios.

  • Selenium Webdriver has no feature such as Object Repository/Recovery Scenario.

  • Selenium Webdriver has no default test report generation.

  • Selenium Webdriver requires programming and technical knowledge to develop automated tests.

  • Selenium Webdriver requires time to be more compatible and stable with new browsers.

  • Selenium Webdriver is difficult to set up since no vendor support is available.

  • Selenium Webdriver can be extended for various technologies that expose DOM.

  • Selenium Webdriver has a big community support for help in case of issues.

Selenium Grid

Selenium Grid is mainly used for parallel testing. It follows a hub (which is a central part and rest are considered as nodes) and node architecture. Selenium Grid enables us to execute varied tests in multiple machines simultaneously. Selenium Grid is used mostly with the intent of test execution rather than design.

Some of the features of Selenium Grid are listed below −

  • Presence of a hub machine which directs the execution on multiple machines using the Selenium Grid. Also, there are more than one node machines where the actual execution takes place.

  • Selenium Grid supports testing on multiple browsers and platforms.

    Reduces execution time by allowing parallel execution of tests.

Currently the latest version of Selenium is on version 4. From the Selenium 4 version, the entire architecture is fully compatible with W3C - World Wide Consortium meaning Selenium 4 follows all the standards and guidelines given by W3C. We can get more information about W3C from the below link −

https://www.tutorialspoint.com/world-wide-web-consortium-w3c.

The basic difference between Selenium 3 and Selenium 4 is that, in Selenium 3 the communication between client and server is done by JSON Wire protocol, however, from Selenium 4, there is direct communication between the server and client, following the W3C guidelines.

Before Selenium 4, the communication between the client and server was carried on using the JSON Wire protocol over HTTP. However, there is no existence of JSON Wire protocol from Selenium 4,and there is direct communication between the client and server using the W3C protocols.

Also, Selenium 4 gives some additional locators (apart from the regular locators like id, class, xpath, and so on) called the Relative locators with the help of the methods - above, below, near, toRightOf, toLeftOf, and chaining of multiple Relative locators. Selenium 4 also gives access to the ChromeDevTools which help for debugging, network traffic analysis, and other features that help in automation.

Thus, in this tutorial, we had discussed various components of Selenium.

Advertisements