Selenium is an open-source suite of testing software that can automate web browsers to mimic real user behavior. The Selenium suite has three main components: Selenium WebDriver, Selenium IDE, and Selenium Grid.
- Selenium WebDriver is an API and protocol allowing for programmatic automation of web browsers with a variety of programming languages.
- Selenium IDE (Integrated Development Environment) is a browser extension available for Chrome and Firefox. It allows for the recording and playback of user behavior.
- Selenium Grid is a proxy server that allows tests to be run in parallel on multiple machines, operating systems and browsers.
Selenium IDE (SIDE for short) offers users a way to get up and running with automated tests in very little time with very little overhead. It requires no programming or engineering to use but is still capable of quite a lot.
- Low barrier for entry
SIDE is a browser plug-in available for Chrome and Firefox. This means it requires almost no technical knowledge to install and begin creating tests by recording and playing back user behavior. The easy-to-use graphical interface of the IDE also makes the process of altering and editing tests accessible to users who aren’t necessarily literate in one of the programming languages supported by the WebDriver. What’s more, SIDE still allows users to implement advanced logic like making assertions, instituting control flow (if, else logic) and looping (e.g. do x while y is true).
- Test suites are light-weight and very portable
When you save a SIDE test or test suite it is saved as a “ .side” file (e.g. “my_test.side”). The tests are stored in JSON format, making it simple to edit them or compare their contents. An example of editing one might be changing all instances of the starting URL using “find and replace” functionality in a text editor like Sublime Text. It also means that the test files are small in size and easily portable. They can be sent as email attachments, shared via team collaboration apps like Slack and MS Teams, or committed to a code repository like git.
- It’s free!
No really, the industry standard for testing automation is open source and free.
- Now .side files can be run from the command line
If you want to expand the selection of browsers you are testing on, or run tests in parallel, there is a slightly more technical solution that allows you to run “ .side” files directly to the command line, and can even be used in conjunction with Selenium Grid.
- Well Documented
There is a large community of Selenium users and years' worth of questions and answers online. A word of caution here though: Some of the articles and Q&A posts relate to previous versions of SIDE and are not applicable to the current version. If you do find yourself looking for answers online, pay attention to the publication date of the article.
- Supports plug-ins
SIDE allows for the creation of plug-ins. If you have an in-house development team, it is possible to add functionality to SIDE based on your needs. If you don’t have the resources internally, there are quite a few third-party and open-source plug-ins already in existence and chances are good that one of them addresses your needs.
- Code Export!
A note on most of the items in the “Cons” section - Many of the shortcomings of Selenium IDE have been addressed by third-party or open-source plug-ins. Moreover, SIDE is still being actively developed. To give you an idea of how this impacts the product when I proposed this blog topic (three or four months before its publication date) the “Code Export” feature was in the “Cons” list because it hadn’t been released yet.
- Overhead and upkeep
As your web application changes and evolves, some of the paths Selenium uses to locate objects may change. For example, if the “name” or “id” attributes of an element change, the test may no longer be able to locate it and require an update. If new elements are added to a given page, it will also change the “xpath” to the original elements potentially rendering that element unreachable by Selenium. This is true for most web testing automation software (including Selenium WebDriver) but is worth stating. The larger and more robust the test suite, the more upkeep it will require. This is one reason that SIDE is ideal for short test cases like smoke testing, but less so for something like full regression testing.
- No data-driven scripts
At the time that this article was published, SIDE did not support the ability to import data from an external file like a .csv file, and then execute a test for each record within it. According to some contributors to the project on Github.com, this is both in development for native support, and there are plug-ins in development as well.
- No built-in reporting capabilities
As of now, there are no reporting capabilities built into SIDE, but there are several plug-ins that address this.
- No technical support
One of the downsides of the product being free is that there is nobody to contact when things go wrong. However, as stated in the “Pro” column, there is a large community of users and many of the issues you are likely to encounter have already been addressed on blogs and sites like stackoverflow.com
Selenium IDE does have some limitations as a testing framework, but is a valuable tool in its own right and deserves a place in the toolbox of any testing team.