Introduction to Components of Selenium
Components of Selenium
As discussed earlier, the four components are as below:
- Selenium IDE
- Selenium RC
- Selenium Web driver
- Selenium GRID
Let us have a look at these in detail.
1. Selenium IDE
- This is the simplest suite present in the Selenium suite. Selenium IDE allows to record and playback of the scripts. It is implemented using the Firefox extension. By using Selenium, you can record, edit and debug different tests. The tests created can be easily organized by having different tests in different suites. The record and playback functionality helps in prototyping the tool and provides the ease of learning. It acts as an overall solution for developing and maintaining different suites.
With all these there are some additional features of Selenium as below:
- It has an easy record and playback mechanism.
- It has the option of automatically asserting the title of every page.
- It provides the facility of autocomplete for all frequently used commands.
- It provides debugging options with set breakpoints.
- Selenium supports user extensions like .js file.
- It makes use of intelligent field selection which will make use of IDs, names or XPath as required.
2. Selenium RC
- Selenium Remote Control is a testing tool which helps in writing test scripts for web-based applications in any programming language. It has two parts to it. First is the one which launches and kills browsers. This server acts as an HTTP proxy server for different web requests. It also supports different client libraries. Selenium RC is the first tool that provided support for different programming languages like Java, Ruby, Perl, PHP, etc. In Selenium it is required to start the Selenium server before the tester starts the execution. The Selenium server kills the browsers and runs Selenese commands which act as an HTTP proxy and intercepts messages.
3. Selenium Web driver
- Selenium server depends on the intention of using the Web driver. If the browser and test cases are to run on the same machine, then there is no need to run the Selenium server. Web driver will run directly. You can use Selenium Grid to segregate the tests over multiple machines and virtual machines. Selenium server would be required when the tester is connecting remotely or through a particular browser.
- The web driver interface declares different methods that can be used for end to end testing. The test class which is created should be used in the browser-specific implementation. This test class can control web browser and also select different elements which can be loaded from HTML pages. The web browser provides APIs which help in remotely controlling the user interface test web applications.
4. Selenium GRID
- Selenium GRID is a suite that has specialization in running multiple test cases parallelly. These can be different browsers, operating systems, and machines in parallel. It uses the concept of hub-node. This means that only running the test on a single machine but executing it on different nodes. This helps in parallel execution and makes GRID platform-independent. Also, it is not browser-specific and supports all browsers.
- There are two versions of Grid. They are Grid 1 and Grid 2. Hub is the central point where all test cases are to be loaded. There should be only one hub in the grid. There are be any number of nodes in the grid. Also, nodes can be launched on different platforms and browsers.
In the fast-changing world, it is very important that all tasks are being performed quickly. Automation plays an important role in accomplishing this. Selenium is a tool that is open source and provides a quick tool for automating different web applications. Its four components help in the record and play, run multiple test cases and provides facilities of using different browsers and languages for automation. Being open-source, it is free and everyone can download and use it as and when needed.
This has been a guide to Components of Selenium. Here we discuss the different components of selenium in detail. You can also go through our other suggested articles to learn more –