Selenium IDE – Record Selenium Script


Selenium IDE – Record Selenium Script

Selenium IDE is an integrated development environment to record and playback the selenium scripts to test website on firefox. Its is a Firefox plugin where Tester can Record, Edit and play the Scripts. If you are new then this is right place to start learning Selenium!

Selenium IDE has core selenium functionality by which you can export the recorded scripts in different formats as well and can be used by Advance Selenium user.

Selenium IDE is not only the recording and playback tool but you can edit your scripts and maintain it.

 Features of Selenium IDE:

  • Easy record and playback
  • Intelligent field selection will use IDs, names, or XPath as needed
  • Autocomplete for all common Selenium commands
  • Walk through tests
  • Debug and set breakpoints
  • Save tests as HTML, Ruby scripts, or any other format
  • Support for Selenium user-extensions.js file
  • Option to automatically assert the title of every page
  • NEW! Easy customization through plugins

How to Start with Selenium?  ( note video of this lesson is here

First of All you need to download the Firefox and then Selenum IDE plugin for firefox.

1) you can download the plugin  from :

Latest version :

2) Just install the plugin as you install other firefox plugin, Restart your browser.

3) Under Tools menu, you will find the Selenium IDE, Click on it, it will open the Selenium IDE window

Great! now you are Set to learn Selenium IDE. 

following is the basic areas of Selenium IDE window

selenium ide


Basic URL : is the Url which you want to test

Test Case Area : where your all tests cases gets maintain

 Script Editing Window :  this is place where your test case will gets recorded and you can able to edit the test case.

Record button :  with the help of this button you can start and stop the recording.


Lets Record the simple script…  go the following steps

1) Open the Firefox browser

2) Go to website

3)  in Firefox menu > go to Tools > select Selenium IDE

4) you will get the Selenium IDE window, make sure that Based URL in Selenium IDE should be else you will not able to capture the action also make sure that recording button should be pressed.

5) Click on Software testing menu item

6) you will notice following script gets generated.

selenium ide

7) Now Stop the recording by clicking on Record button

8) click on run button again to run the script again

You are Done!

in the next lesson we will see how to read the code generated from this script. to generate the code do following steps.

9)  Now click on File > Export test case as > Java/junit 4/Webdriver

10)  Save the file and open the same in the eclipse or any any ide.

following code will gets

package com.example.tests;

import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Recording {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();

public void setUp() throws Exception {
driver = new FirefoxDriver();
baseUrl = "";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

public void testRecording() throws Exception {
driver.get(baseUrl + "/");
driver.findElement(By.linkText("Software Testing")).click();

public void tearDown() throws Exception {
String verificationErrorString = verificationErrors.toString();
if (!"".equals(verificationErrorString)) {

private boolean isElementPresent(By by) {
try {
return true;
} catch (NoSuchElementException e) {
return false;

private boolean isAlertPresent() {
try {
return true;
} catch (NoAlertPresentException e) {
return false;

private String closeAlertAndGetItsText() {
try {
Alert alert = driver.switchTo().alert();
String alertText = alert.getText();
if (acceptNextAlert) {
} else {
return alertText;
} finally {
acceptNextAlert = true;




in similar recording and playback of scripts can be done using Selenium IDE

Leave A Comment