Introduction to Components of Selenium
Selenium is an open-source system that helps in testing different web applications. It can be used over different browsers and is easy to use. It is a suite of tools that provides different ways of testing. There are four components that comprise of Selenium. They are Selenium IDE, Selenium RC, Web Driver, and Grid. It supports different languages like Java, PHP, Ruby, and Python. Selenium has an added advantage of being platform-independent. It has a library that consists of different classes, methods, and interfaces. This is the main reason of Selenium being widely used by different organizations.
Components of Selenium
As discussed earlier, the four components of Selenium are as below:
- Selenium IDE
- Selenium RC
- Selenium Web driver
- Selenium GRID
Let us have a look at these in detail.
1. Selenium IDE
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 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.
4.5 (1,071 ratings)
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 –