Components of Selenium | The Gradual Evolution
It wouldn’t be wise to proceed without knowing about the components of Selenium. There are in all five components of Selenium that you should know about.
Components of Selenium
- Selenium IDE
- Client API
- Selenium RC
- Webdriver
- Selenium Grid
We will take a look at them one by one, and try to understand why each one of them is important and has a role to play in structuring Selenium.
Selenium IDE
As the name might suggest Selenium IDE provides you a complete Integrated Development Environment for creating Selenium test cases. It comes in the form of Firefox Add on and gives you options to edit, record and debug tests. Owing to such recording activities it became famous as ‘Selenium Recorder’.
Selenium IDE introduced the concept of UI or User Interface for the first time. It has its very own scripting language called Selenese. The language provides options for clicking a link, selecting something or retrieving data from newly opened pages. You literally don’t need any programming experience here to work with.
That being said, features like that makes Selenium IDE probably the simplest framework to work with. It is also the easiest one to master. However, the following limitations force people to opt for other components:
- It is only available in Firefox
- You can only create prototypes of tests
- Iteration and conditional operations are not supported
- Test Execution is slow
- Bad report generation system
- Parallel Execution not supported
- Does not support Remote Execution
Selenium Client API
What if you already know a programming language and wish to work with Selenium to write test cases? If that is the case you can skip working on Selenese, and choose to opt for your favorite programming language. Selenium provides client APIs support for the following programming languages:
- Java
- C#
- Javascript
- Python
- Ruby
With the advent of Selenium 2, a new Client API with Webdriver as its main component was introduced.
Selenium RC also called Selenium – 1
Selenium Remote Control is nothing but a server that was written in Java. It makes use of HTTP to accept commands intended for browsers. With the help of Selenium RC you can write automated test cases in any programming languages, thus overcoming the limitation that Selenium IDE posed. It provides drivers for PHP, .NET, Java, Python, Ruby, Perl.
However, there were numerous limitations encountered while working with Remote Control as well, like its dependency with server, or the need to restart the server again and again. Results were inconsistent and it made use of Javascript. Even the browser interaction wasn’t good.
The good news is that Selenium RC is deprecated now with the onset of Selenium 2. It made way for Selenium Webdriver. One less thing to worry about. Phew!
Selenium Webdriver also called Selenium – 2
To overcome the limitations posed in by IDE and RC, Webdriver came into existence. It is quite obvious that it was better than them both. Webdriver was an immediate successor of Selenium RC.
The performance was improved greatly by making the remote part a separate jar. It supports mobile automation targeting the mobile industry which is currently booming. For instance, we have Selendroid and Appium introduced to automate iOS and Android application.
There are browser specific drivers entailed here that sends or retrieves commands from a browser. An example of which we saw in the “Installing Selenium Webdriver chapter“.
Webdriver controls a browser by directly interacting with it. It happens to be one of the most crucial USPs of it. It doesn’t rely on Javascript unlike RC to carry on testing. Languages supported here are the same though.
Selenium Grid
When you wish to attain parallel execution, Selenium Grid walks forward. It is a server that uses web browser instances that run on remote machines. So you can run your tests on a remote browser spreading the testing load and thus performing parallel execution.
There is one server acting as the hub which is contacted by tests for access to browser instances (nodes). The hub carries the name of servers allowing tests to use the instances.
Now that you know all about the components of Selenium it is time to try the automation testing using these methods. Wait for it!
2 Responses
[…] Selenium IDE is the first component that we had seen in components of Selenium, we will learn how to use Selenium IDE in Firefox hereby […]
[…] we had already seen in the chapter about evolution and components of Selenium, Selenium Webdriver had emanated from Selenium RC which was also known as Selenium – […]