{{announcement.body}}
{{announcement.title}}

Installing and Setting Up Selenium IDE

DZone 's Guide to

Installing and Setting Up Selenium IDE

Learn how to install and set up Selenium IDE, the most popular test automation tool.

· DevOps Zone ·
Free Resource

1. Introduction to Selenium IDE

Selenium IDE (Integrated Development Environment) is the most basic automation testing tool in the Selenium Suite. It is a Firefox add-on which creates tests very quickly thanks to its record-and-playback functionality. Moreover, Selenium IDE is also the easiest tool to learn, install and go ahead with generating test scripts.

Due to its simplicity, Selenium IDE cannot be a suitable solution for developing and maintaining complicated test suites. Although users do not have to acquire any prior programming knowledge, they should at least know how to use JavaScript, HTML and the DOM (Document Object Model) to utilize the tool to its full potential.

Despite the development of its ecosystem, the Selenium IDE itself has not undergone many evolutions since the release. While being stable, the tool was built on Firefox’s add-on platform, which did not matter at that time, but things have changed since Firefox has lost its dominant position. Since then quite a lot has happened with the Selenium IDE. It was supposed that the IDE would no longer be around in the near future, and those testers had to look for alternatives. Fortunately, along with huge support and contributions from the rest of the Selenium community and the SideeX project, the new Selenium IDE has been gotten out into the wild. The user can run the tool in both Firefox and Chrome. Although it is currently at the beginning stage, this new tool is expected to be added some much necessary improvements compared to its predecessor.

2. Selenium IDE Download & Installation

Download the IDE Using Chrome or Firefox

Open the browser (Chrome or Firefox) and enter the URL http://seleniumhq.org/. This would navigate to the official Selenium headquarter website. Then, go to the “Download” page, which contains all the latest releases of all the selenium components.

Download IDE

Move under the selenium IDE head and click on the link present. This link shows the latest version of the tool.

Selenium IDE latest version

After you click on the above link, a security alert box would immediately appear to protect the system against potential risks. Then, click on the “Allow” button.

Install Selenium IDE

After the process finishes, the software installation window appears. Click on the “Install Now” button.

Install now button

After completing the installation, you will see a pop-up window appearing and asking you whether you want to restart the Firefox. Click “Restart Now” to reflect the Selenium IDE installation.

Once the browser is started again, you can see Selenium IDE listed under Menu Bar ⇒ Web Developer ⇒ Selenium IDE.

Selenium IDE installation

After Selenium IDE is opened, the Selenium IDE window will appear.

3. Features of Selenium IDE

 Let’s have a look at each of the feature in detail.

Main features Selenium IDE

Menu Bar

The menu bar, which is located at the uppermost of the Selenium IDE window, consists of five modules: File, Edit, Actions, Options, and Help.

File Menu

File Menu in Selenium IDE

File Menu allows users to:

  • Create a new test case, open available test case, save the current test case.
  • Export Test Case As and Export Test Suite As in any of the associated programming language compatible with Selenium RC and WebDriver. It also allows users to choose their preferable testing frameworks such as TestNG and jUnit. Therefore, you can export an IDE test case with the chosen programming language, a unit testing framework, and tool from the Selenium package.
  • Export Test Case As — only the currently opened Selenium IDE test case is exported and converted.
  • Export Test Suite As — all the test cases related to the currently opened test suite is exported and imported.
  • Close the test case.

Main features of File Menu

Edit Menu

Edit Menu

The Edit Menu allows users to Undo, Redo, Cut, Copy, Paste, Delete and Select All. There are two other remarkable functions:

  • Insert New Command: new command/test step can be inserted anywhere within the current test case.
  • Insert New Comment: new comment can be inserted anywhere within the current test case to illustrate the subsequent test steps.

Actions Menu

Actions Menu

Actions Menu provides users the following options:

  • Record — This turns the Selenium IDE into the recording mode. Therefore, the tool will record all actions made on the Chrome or Firefox browser.
  • Play entire test suite — All the Selenium IDE test cases related to the current test suite will be played.
  • Play current test case — The current Selenium IDE test case which has been recorded/created will be played.
  • Pause/Resume — The user can pause/resume the test case at any time during the execution process.
  • Toggle Breakpoint — One or multiple breakpoints (s) can be set to forcefully break the execution at any particular test step during the execution process.
  • Set/Clear Start Point — Start point can also be set at any particular test step for execution. This option allows the user to execute the test case from the given start point for the subsequent runs.
  • To handle the page/element loads, the user can adjust the execution speed from fastest to lowest regarding the responsiveness of the application under test.

Options Menu

Options Menu

The options menu allows the user to set and practice different settings provided by the Selenium IDE. Thus, this option can be one of the most essential and advantageous menus of the tool.

The Options Menu includes the following four components which can be subdivided into the following:

Components of Options Menu

In order to launch the Selenium IDE Options dialog box, you need to follow the steps below:

  1. Click on "Options Menu"
  2. Click on the Options

After that, the Selenium IDE Options dialog box will appear.

Selenium IDE Options

The Selenium IDE Options dialog box allows the user to play with the general settings, available formats, available plugins, and available types and their builders.

General Settings

General Settings

  • Default Timeout Value — this represents how long (in milliseconds) that Selenium would wait for a test step to execute before generating an error.
  • Extensions — Many extensions are supported to promote the capabilities of the core tool thereby multiplying its potential.
  • Remember base URL — By checking this option, users will have the URL remembered every time they launch it. It is necessary to mark it checked.
  • Record assertTitle automatically — When this field is checked, the assertTitle command will be automatically inserted along with the target value for every visited web page.
  • Enable experimental features — When this field is checked for the first time, different available formats will be imported into the IDE.

Example of General Settings

Formats

Example of General Settings

The Formats tab lists all the available formats with the IDE and helps users to enable and disable any of the formats.

Selenium IDE plugins

The Plugins tab presents the supported plugins installed on our example of Selenium IDE.

In the standard distribution, the IDE comes with a cluster of the following plugins:

  • Ruby Formatters
  • Python Formatters
  • Java Formatters
  • C# Formatters

These formatters are in charge of converting the HTML test cases into the desired programming frameworks.

Example of General Settings

Locator Builders

Locator Builders help users to prioritize the order of locator types created while user actions are being recorded. Locators are the set of requirements by which users uniquely verify a web element on a web page.

Locator Builders

Format

This option helps users to convert the Selenium IDE test case (Selenese commands) into the desired format.

Format option in Options Menu

Help Menu

The Help Menu is used to list down official documentation and release notes for users.

Base URL Bar

The Base URL Bar is typically similar to that of an address bar. As the previously visited websites are remembered, navigation will become easier later on.

Format option in Options Menu

Toolbar

Toolbar

Users can use the toolbar with different options applicable to the test case recording and execution

  • Playback Speed — adjusting the speed of the test case execution from fast to slow.
  • Playtest suite — executing all the test cases being part of the current test suite sequentially.
  • Playtest case — executing the currently selected test case.
  • Pause — pausing the current execution.
  • Step — stepping into the test step.
  • Rollup — integrating multiple test steps to act as a single command.
  • Record — starting/stopping the recording of user actions. 

Editor

The Editor is a section by which the IDE records test cases. Besides, this section has two views including Table view and Source view.

Table View

This is the default view of Selenium IDE. The test case is shown in the tabular format. Each user action in the table view is an integration of “Command”, “Target” and “Value”. Besides recording function, it also helps users to insert, create and edit Selenese commands along with the support of the editor form.

Source View

The test case is shown in the HTML format. Each step is considered to be a row <tr> which is a combination of command, target, and value in the separate columns <td>.

Source view

Test Case Pane

The test case pane consists of all the test cases recorded by the IDE. Moreover, the tool allows users to open more than one test case simultaneously and easily shuffle between the test cases.

Selenium has coding colors for users to report test cases. After finishing the execution, the test case in marked either in red (the failed run) or green color (successful run).

Test case pane in Selenium IDE

Log Pane

The log pane provides information about the current execution. Therefore, log messages allow users to debug if the test case fails to be executed.

Log pane in Selenium IDE

Conclusion

Through this article, you are provided the step-by-step instructions to get used with Selenium IDE. Selenium in general, as well as Selenium IDE in specific, are great pieces of technology that mega-changed the era of automated testing. Besides, as Selenium IDE has been getting faded away, the new Selenium IDE is expected to become its inspiration and keep going with the mission of making software testing better day by day.

Topics:
devops, selenium, test automation, tutorial

Published at DZone with permission of Brian Richardson . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}