Selenium IDE is a Firefox add-on, which allows simple record and playback of browser interaction. Tests are recorded as scripts in Selenese, a special test scripting language for Selenium.
The easiest way to understand how Selenium IDE works is to download it and install it in Firefox. Once installed, you turn it on via the Firefox Tools menu, Selenium IDE option. The IDE will then appear, as shown below.
Selenium IDE Screenshot
The main parts of this window are:
- The Menu options – File, Edit, Actions, Options, Help
- The Base URL input
- The Playback and Record buttons row
- Then under this, to the left, the Test Case list
- To the right, the Command window, listing the Commands in the current script, with focus on the current Command also shown
- Then at the bottom, the Log/Reference/UI-Element/Rollup area
Selenium IDE – Recording
Selenium IDE – Playback
Selenium IDE – Commands Window
Command Target Value open /search clickAndWait css=span.tl > h3.r > a.l verifyTextPresent verifyTextPresent
In the Command list, you can edit the entries as required and also use the self-explanatory right-click options Insert New Command and Insert New Comment.
Selenium IDE – File Menu Options
Using the File menu, you can save Test Cases and Test Suites (a collection of Test Cases) to HTML files.
A great option is Export Test Case As… which allows you to export your Test Case commands out to which ever programming language / scripting language you’re using, including Java, Python, C# and Ruby.
Selenium IDE – Example Script Output
Below is a simple script in HTML format (basically a HTML table) and followed by the same script in Python.
Selenium IDE – HTML Format Script Output
Selenium IDE – Python Format Script Output