What is the actual use of Selenium IDE? Apart from playback and record How can we use this tool to check the validations of a simple login form in website?


I used the Selenium IDE extensively on my last project. I had a suite of tests in a test domain specific language and a translator that created Selenium IDE test suites. When I left the project, there were more than 700 tests in the suite.

a) The test DSL was originally written in XML, based on a number of other test DSLs I had created for other projects. The test DSL was originally built to generate test scripts for humans to follow. When Selenium IDE came to my attention, it was quite simple to repurpose the translator to create Selenium IDE files. Several hundred test scripts were re-used.

The translator was an XSLT script, and bundled the individual test cases into test suites. Near the end, I rewrote the DSL and the translator into Perl, for much improved performance and readability. I looked seriously into rebuilding the process in Java but the incremental improvement in test coverage and browser coverage weren't justified.

b) The test DSL was actually generated from a bunch of spreadsheets, using a template language, translated by an XSLT script (then Perl).

c) Multiple data sets resulted in multiple files. A change to the UUT user interface required changing one master file for a form, and then regenerating the test suite.

Months after leaving the project, I still consider the Selenium IDE a godsend for UI test automation.


Yes, you can do validations using either verify or assert. Check this documentation which will give you a clear idea - http://docs.seleniumhq.org/docs/02_selenium_ide.jsp

For complex automation, you need to use Selenium WebDriver which gives you flexibility to code.


From the answer of @Bob Dalgleish you can see that output of Selenium IDE is quite hard to use. get XML, transform it with XSLT and Perl? No thanks!

IDE is useful to show locators, but test it generates are too linear and will repeat big chunks of code, as if they were copy-pasted. So if any change is made, chances are exactly the same change will need to be made in very many places. To avoid this, competent automated testers design test using PageObject pattern in their favorite programming language (which for me is Python).

As a result, I have very little use of Selenium IDE. If your fronted designer is competent, UI elements have ids, and "inspect element" will reveal it - that's all you need to know about it. Rest is code.

I prefer this approach possibly because I came to test automation with development background, so writing code was "normal" for me, and Se IDE was not helping much in accomplishing that goal. I don't want to maintain hundreds of lines of boilerplate generated code. If I did, I would be using Java :-)

  • Toward the end of my time on that project, we seriously considered re-coding the tests in Java. I even had built a translator that would directly generate Java/WebDriver test code but didn't finish it. There were other benefits to the DSL, including the ability to generate human readable tests for parts that were not easily automatable (checking alignment of fields, graphics rendering, etc.) Aug 7 '14 at 14:59
  • Even Java/WebDriver generated code will not help you because it is still plain old linear step-by-step interactions. To improve coder's productivity, your tests need PageObject, and such redesign and refactoring cannot be generated yet. Aug 7 '14 at 16:32
  • That still wasn't my point. Each of my test cases started at the beginning, filled out fields, checked status displays, submitted the form and tested the result. I already had the DSL, the data and the approach. Aug 7 '14 at 16:36
  • While the big push is definitely towards PageObjects and more flexible, code driven tests, there's still a lot of value to the IDE. I can't find the video now, but I remember there was one a few years back about some web retailer that got a lot of bang for the buck having lower skilled testers using the IDE to record tests. Maybe a bit of a brute force approach, but it worked for them.
    – ernie
    Aug 8 '14 at 19:05
  • Test recorded in IDE cannot be changed or parametrized. So i.e. you cannot just add one more order, locate it's number, and work with that. You have to start with known database, and run canned test in the same order, to have the same IDs of orders or whatever. And you cannot fill current date in IDE unless you have a widget to enter current date. So yes, you can do some testing in IDE end rerun recorded test but you can test only very limited functionality. I agree that usability of IDE is not zero but it is a small number. Aug 11 '14 at 11:37

A practical use of the seleniumIDE is testing your web site works correctly in firefox.

You use commands such as


to verify page contents

Generally you should avoid record and play (generates brittle tests that break easily as soon as the page is changed) and learn how to write good use of selectors yourself.

As you advance you should look to use a PageObject model approach which IS supported by the IDE - just use the load javascript file from the 'options' tab.

enter image description here

and put your page object descriptors in that file.

Example format of that file:

storedVars["css_violation_submit_form_input"] = "css=form.new-violation input[type=submit]";
storedVars["css_claim_submit_form_input"] = "css=form.new-claim input[type=submit]";
storedVars["css_driver_submit_form"] = "css=form.new-driver *[type=submit]";
storedVars["css_vehicle_submit_form"] = "css=form.new-auto *[type=submit]";

Part of a practical example is shown here from a site for car insurance quotes with forms being filled out and asserts being done. enter image description here


What we do is use the Selenium IDE to record scenarios, then save as Webdriver python scripts. The code in webdriver flavour is pretty readable and you can then modify the scripts as needed. You can use the IDE to add assert/verify or just add it in the scripts yourself. Then we use Robot Framework to drive these test cases, linked to Jenkins then you get yourself a low-cost automated testing. This won't cover 100% of your test plan but it has a very low technical requirement, so even the newest guy in QA can start to be productive within a day or less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.