Selenium IDE: History, Feature and Installation Guide
Table of Contents
Introduction: The Need for Selenium Automation Testing
In a real-world scenario, a manual tester has loads of complex and dynamic tests to run. If a few standard workflows are run through automated testing, it saves a lot of time and redundancy, especially during the integration testing, performance testing, and compatibility testing, system testing, end-to-end testing, and regression testing phases! Automating tests also help bring consistent results and makes the entire process robust. Selenium testing also helps in boosting Agile development as it fully cooperates with the concept of continuous integration/delivery wherein code is built, deployed, and tested continuously.
Let Us Dive Into Selenium IDE
But, before that – what exactly is Selenium?
Selenium is a testing framework where you can write test cases in languages like Java, Groovy, C#, PHP, Python, Scala, Ruby, Perl, and Selenium’s scripting language called Selenese. It has three components – Selenium WebDriver, Selenium Grid, and the Selenium IDE.
Selenium IDE is a recording and playback tool to functionally test any web application without the need for any coding or knowledge of a scripting language. The tool works on many browsers, including Firefox and Chrome, as an add-on.
There is no setup required for Selenium IDE. All you need to do is install the browser-specific extension. Testers can record their interactions with any website using the GUI provided by the IDE. Selenium IDE is available as part of the Selenium Test Suite.
Whenever a test has to be performed, testers enable the recording option within the IDE and then play the test case on the browser. IDE is then able to replay the same interactions and report the differences/errors, if any.
A Bit of History
Initially developed by Jason Huggins in 2004, Selenium was later named as Selenium Remote Control or Selenium RC when Paul Hammant joined the team. The project continued to be developed, and many others joined hands. Simon Stewart, from a company named ThoughtWorks, was able to create a better browser automation tool i.e., Selenium WebDriver, around the same time. After some talks, it was decided to merge both the projects and the final tool was named as Selenium WebDriver. The Selenium IDE was developed separately by Shinya Kasatani, who donated it to the Selenium project in 2006; however, it wasn’t maintained well until the year 2018.
Unique Features of Selenium IDE
Some unique features and advantages of Selenium IDE are:
- You can select the test cases to be run or run the entire suite at once.
- A particular test case can be paused/resumed at any time.
- Controls the speed of test cases.
- Able to group all the Selenese commands and execute them as a single command.
- Automatic recording of test cases.
- Easier debugging as testers can set breakpoints anywhere during the test case execution.
- Test cases can be reused across multiple functionalities in the entire suite.
Selenium IDE as an Extension/Add-On
Previous versions of the recording tool had multiple issues like lack of cross-browser support, inability to extend functionality or do visual testing, no provision for debugging or running scripts in parallel, and more. Selenium IDE did not see the light of the day until 2018 as mostly everyone focussed on Selenium WebDriver. From December 2018 up till now, there has been a steady increase in the growth of Selenium IDE, which means its popularity is increasing. As of 2006, the IDE was working only on Firefox, but today it works on all major browsers as a plugin. Using SIDE runner, the command line test runner, the IDE can also test cases on the Selenium WebDriver server. Browsers supported by Selenium IDE are:
Installation and Setup
The installation and setup are straightforward. We will describe how to install and set up the IDE for Edge, Firefox, and Chrome one by one.
Selenium IDE Installation on Edge
1. Go to the Microsoft edge official installation page.
2. Click on ‘Get’
3. A popup will appear, requesting confirmation to add:
4. Click on ‘Add extension.’
5. Once done, you will get a notification that the extension has been added. To verify the same, click on settings (the three dots on the top right) and then Extensions:
6. A new tab with all the installed extensions will open, where Selenium should be the most recent one:
Selenium IDE installation on Chrome
To install Selenium on Chrome, you have to visit the Chrome web store, search for Selenium IDE, and click on ‘Add to Chrome,’ and you should be done!
Selenium IDE installation on Firefox
Selenium IDE can be added as an add-on on Firefox. Just browse to the add-on page of Firefox, and click on ‘Add to Firefox’ and done!
Once the IDE is installed, it is ready to use!
Selenium commands are written in its programming language called Selenese. We use these commands to test the web-applications.
There are three types of commands in Selenium:
- Actions: a change in the state of the application – for example, if you click on the submit button, you are redirected to some other page.
- Accessors: enable the verification and storage of the current application state.
- Assertions: assertion of the result, if expected and actual results are the same, returns true, else false. Assertions tell us whether a test case has failed or passed. There are three modes of assertion – Assert, Verify, and WaitFor.
Checkout the Selenium API to know more commands.
Selenium IDE Basics
Selenium IDE interface is quite self-explanatory and straightforward; however, we will see some important features below.
Let us check out some basic menus and options provided by Selenium IDE. For this article, we will be using Chrome, but the options are pretty much the same on other browsers too.
First of all, launch Selenium IDE from the menu bar of the browser:
You can also pin the IDE so that you need not click on Extensions again.
You will get a welcome window with four options:
So, let us create a new project! Select “Create a new project” and give a nice name for your project. Then you can give the URL of the website or application that you are going to test. Open the TestSuite or Tests that you want to run.
Notice the highlighted content in the above image. You can choose from Tests, TestSuite, and executing test cases view. On the top right, you can see an option for disabling or enabling breakpoint and then the option to record. The results of test cases appear in the log. For example, if an assert fails, you will get something like this:
A simple example of an action:
Once you click on any link, Selenium IDE gives a message that it has recorded a click (action):
Everything gets recorded on the dashboard:
Tests: New tests can be added at any point using the ‘+’ icon at the top left (side-bar menu).
Suites: Many tests can be grouped to form a suite that can be run at once. Selenium IDE creates a suite by default when you create a new project, and the first test gets added into the default suite. You can also add a suite manually by clicking on the ‘+’ icon from the left menu next to the Test Suites heading. You can remove a single test or an entire test suite using the ‘Delete’ option. Same way, you can save the tests or test suite using the save icon.
Some Limitations of Selenium IDE
While we can argue that Selenium has some excellent capabilities, it is not suited for testing extensive sets of data. It cannot handle multiple windows or a dynamic part of web applications. Further, other tools in the market even capture the screenshot of a failed test, which Selenium IDE is currently not capable of. We cannot test cases related to database connectivity.
Selenium IDE is no doubt the easiest and most accessible testing tool that doesn’t require any setup. It can be installed in a jiffy. Light-weight and cross-browser compatible, it comes with a host of commands that can record a variety of scenarios to test a web application on the browser. To learn more about Selenium IDE and WebDriver, check out these fantastic tutorials.
You can smoothly playback the tests in the IDE using the in-browser playback option. You can select a single test or the entire suite. To run the tests on other browsers parallelly, you can install the Selenium IDE command line runner, get the required browser drivers and launch the runner from cmd (command prompt) with whatever options you want.
People are also reading:
- Best Software Testing Courses
- Best Software Testing Certifications
- Best Penetration Testing Certifications
- What is Software Testing Life Cycle?
- Types of Software Testing
- Manual Testing Interview Questions
- What is Selenium IDE?
- What is Selenium WebDriver?
- Best Selenium Testing Interview Questions
- What is Selenium?
- Best Web Development IDE
- Security Testing Tools