Selenium IDE

 Selenium IDE
Selenium is a test tool for web applications. Selenium tests run directly in a browser, just as real users do. Selenium is a JavaScript framework that runs in your web browser. Selenium IDE is a FireFox extension made by the team, that records mouse and keyboard actions as Selenium commands. It is very easy to use and powerful tool for controlling, automating or testing web sites. You can record how an application is being used and then play back those recordings followed by asserts. After recording, you can export test case in many languages like java, Ruby, Perl, python etc.

So, let’s get started with it.

Installing Selenium:  IDE is only available for Firefox as a add-on. In Firefox browser, go to Tools, add-ons, click on get Add-ons, search for Selenium IDE, Click on Install IDE .After installing, restart FireFox.

Selenium IDE explained

After installing Selenium IDE, go to Tools->Selenium IDE, you’ll get a screen which contains

Base URL:The root of web application you want to test. It can be any website URL under test. For ex, If you are test Google’s homepage, then Base URL will be automatically filled by

Fast and Slow: We can specify the speed of the test case using Fast and Slow. Default is fast. Sometimes test fails due to the fast execution. Selenium IDE gives the facility to adjust the speed.

Run Test Suite: If there are many test cases, we can put all together in a suite. This button helps us to run the entire suite.

Run a single Test: After recording a test case, we can run the test case by clicking on this button.

Pause: We can pause a test case using this button.

Step: We can step through the test case.

Apply RoleUp Roles:

Record By default when the IDE comes up it has recording turned on.  You might want to turn it off by clicking on the red button, until you are ready to begin recording.

Command ,Target, Value: Specify commands, including asserts.

Log, Reference, UI-Element, RollUp: Reference of the currently selected command.

Recording a Simple Test:
  1.  Start Selenium IDE  in Firefox: Tools->Selenium IDE.
  2. Browse to and enter ’selenium’ in the search box and click enter.
  3. Click on the first result, which is that of
  4. Stop the recording by clicking on the record button.
  5. If you click on the ‘Source’ tab you can see the test html generated by selenium.
  6. The ‘table’ tab shows the commands recorded by Selenium.  Open a new tab in Firefox and click on the Selenium IDE’s play button to run the recorded test
There are several commands that can be used  .To use the available commands ,follow the step below.
a. Click on the blank line below after the last ‘clickAndWait’ command and insert ‘assertTextPresent’ command from the drop down box as shown below. You should see something like this.

This test checks to see if the text ‘Selenium News’ is present in the last rendered page. Run the test again and you should see that the test has run successfully. No try replacing the text with something that is not present on the page, take for example ‘mpower’ and run the test again. Now the test fails and you should get the screen below.

We can record and play on any website.
Second  example: Now we are  going to use few more commands in our test case. Follow the Step by Step procedure.
  1. Open Firefox browser
  2. In the navigation bar, type in
  3. Go to Tools->Selenium IDE. By default it starts recording.
  4. Now go back to firefox, on the home page, On right clicking anywhere on the page ,you can find show all commands with an arrow.On following the arrow,you can find assertTitle  IT Business Consulting | Liferay Portal | … command. select that command.
  5. Now highlight “Who we Are” and right click , select  verifyTextPresent.   
  6. Now go to Selenium IDE , you can find all the actions you performed in command table tab.      
  7. Now go to File->Save TestCase.Browse to the folder you want to save and then save test case  in .html format.

We have successfully created another test case.Now if we want to run these two test cases one after the other, then we can put them in a suite.

Writing a Test Suite: A Test Suite in Selenium is just an HTML file that contains a table of links to tests.

<table border="1" style="font-size:25">
    <tr><td><a href="./F:/Tests in html/testcase1">Google test</a></td></tr>
                        <tr><td><a href="./F:/Tests in html/testcase2">mPower test</a></td></tr>

In order to create a test suite, all you have to do is create an HTML document that is composed of a table of links to your individual unit tests. Obviously you’ll need to adjust the href’s to wherever you have your test cases stored, but essentially that is all there is to creating a test suite.

Running the Test Suite:   After creating the suite, go to Selenium IDE ->File-> Open test suite->navigate to your main suite position.

After opening suite , click on run test suite and see your tests working. To view the test case running, minimize the FireFox window and keep selenium IDE next to it.
After recording, we can export test case in many languages .Java developers can export test case in Java. Just have to go File->Export test case as->Java (JUnit)
After exporting, we need Selenium RC to run our exported test case.

Extensions to Selenium IDE: You can extend functionalities of Selenium IDE with JavaScript. There are 2 types of scripts in Selenium IDE - formats and extensions.
User-extensions are very easy to use with the selenium IDE.
  1. Create your user extension and save it as user-extensions.js.
  2. Open Firefox and open Selenium-IDE.Click on Tools, Options
  3. Write the user extensions.js file.
  4. Your user-extension will not yet be loaded, you must close and restart Selenium-IDE.
  5. Now you can use the values present in user-extensions.js file.
XPath: One of the main reasons for using XPath is when you don’t have a suitable id or name attribute for the element you wish to locate. You can use XPath to either locate the element in absolute terms (not advised), or relative to an element that does have an id or name attribute. XPath locators can also be used to specify elements via attributes other than id and name.
There are also a couple of very useful Firefox Add-ons that can assist in discovering the XPath of an element:
  • XPath Checker - suggests XPath and can be used to test XPath results.
  • Firebug - XPath suggestions are just one of the many powerful features of this very useful add-on.


  1. Hi,
    I am new to Selenium tool, Actually we have developed the application on Java and Flex. We want to use selenium tool.
    Please let me know how to install selenium with flex.


  2. Hi,

    You can use selenium rc and java to test your application.There is nothing like selenium +flex installation. Just download Selenium RC and write the test script.
    You can also test using IDE.What problem you are facing while recording script in IDE,let me know.

  3. How to find the name and handle the pop up windows that come automatically(dynamic popups)
    for example : if a pop up window comes immediately after login.

  4. Use waitforpopup command to handle that pop up

  5. Hi... I am automating a test framework. I have a challenge to save the exported documents from the UI. I have a link 'Export as xls' in the UI. So, if i click 'Export as xls' in the UI, immediately, a windows xp pop up will arise which asks us to save or open the document. How to automate this exporting and saving or opening the documents.. Thanks in advance if any one can help me

  6. Hi... I am automating a test framework. I have a challenge to save the exported documents from the UI. I have a link 'Export as xls' in the UI. So, if i click 'Export as xls' in the UI, immediately, a windows xp pop up will arise which asks us to save or open the document. How to automate this exporting and saving or opening the documents.. Thanks in advance if any one can help me

    1. You can solve this problem by using firefox profile. when the downloads popup appears for the first time, click on checkbox ,"do this for all " which appears below open file, save file radio button.Then, next time, downloads window won't open, and hence file gets stored on local.

  7. I am working on selenium RC, but getting error while executing script
    In IE and firefox - i am getting message that

    - 14:26:08.830 INFO - Killing Firefox...
    14:26:08.832 WARN - Firefox seems to have ended on its own (did we kill the real

    And for iexploreproxy
    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
    Timestamp: Tue, 7 Feb 2012 08:55:05 UTC
    Message: Access is denied.
    Line: 184
    Char: 9
    Code: 0

    1. have u started your session on port 4444?

  8. Nice information about the Selenium IDE and the options in Selenium IDE are explained in an understandable manner my sincere thanks for sharing this post
    Selenium Training in Chennai

  9. you do such a great thing. I read your blog completely. i understand your writing manner. Thanks for sharing.

    selenium Training in Bangalore

  10. It’s too informative blog and I am getting conglomerations of info’s about Software certification. Thanks for sharing...
    Software Testing Training in Bangalore

  11. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

    selenium training in bangalore|

  12. I have read your blog its very attractive and impressive. I like your blog. selenium Online Training

  13. Thanks For Posting. Can you please Add Some More Selenium IDE Tutorials In your Blog Posts.


  14. Nice post.Thank you so much for sharing.Yiioverflow is a web development company.We have well expert team in Angular JS, Ionic, Yii Framework, Node JS, Laravel, PHP, MySQL, and WordPress.If you want a developer visit..