Thursday, 2 October 2014

Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is implemented as a Firefox Add-On, and allows recording, editing, and debugging tests. It was previously known as Selenium Recorder. Selenium-IDE was originally created by Shinya Kasatani and donated to the Selenium project in 2006.[citation needed]
Scripts may be automatically recorded and edited manually providing autocompletion support and the ability to move commands around quickly. Scripts are recorded in Selenese, a special test scripting language for Selenium. Selenese provides commands for performing actions in a browser and for retrieving data from the resulting pages.


Selenium IDE:

The Selenium IDE is the easiest and fastest way (according to the Selenium tool suite) to create tests (using the capture engine) and replay them afterwards inside the browser (Firefox).

Installation: 

The start into automated browser tests is easy using the Firefox (version 2 and higher) add-on Selenium IDE. The installation is similar to other add-ons and works almost automatically, just use the download link and allow Firefox to install the add-on.
Selenium Installation
After restarting Firefox the Selenium IDE add-on is fully installed and ready to run. To use the add-on you can either start theSelenium IDE in a popup using Tools/Selenium IDE (recommended) or in the sidebar using View/Sidebar/Selenium IDE. When using the Selenium IDE in the sidebar it is not possible to record user interaction in other browser windows. So if the web site/web application uses popups you have to start the Selenium IDE as a popup.

Handling & Usability: 

After opening the Selenium IDE (either as sidebar or as popup) the next step is to create a new test case, using the capture engine. Just enter the base-URL (for example www.google.com) into the field under the file menu. Then click the red "capture" button SeleniumIDE Capture Buttonand navigate to that URL using the navigation bar of Firefox. Enter "Selenium" in the search field and click on the "Google-Search" button. After the search results are displayed, click on the link "Selenium web application testing system". Finally stop the recording process by clicking the capture button again. The result should look like this:
SeleniumIDE Testcase
A look at the recored steps shows what selenium was able to capture:
  • open "/": opens the base-URL
  • type "q" "Selenium": types the value "Selenium" into the field which is identified by "q" (the search fields value of the tagname is "q")
  • click "btnG": clicks the "Google Search" button
  • click "link=Selenium web application testing system" clicks on the specified link
If you run the test by clicking the "Play current test case" button SeleniumIDE Play Button, the test will probably fail because the Selenium IDE is faster than google displays the results. After clicking on buttons/links/... which reloads the current site, you have to use the command clickAndWait. This command synchronizes automatically whith the browser so, Selenium IDE waits automatically until the site has been loaded before it continues with the next step. After changing both click commands to clickAndWaitcommands (by selecting the desired step and in the table and changing command using the drop down list) the Selenium IDEis able to execute the test case without problems. This behaviour is already well documented on the Selenium documentation site.

Predefined Functionality: 

The Selenium IDE is not able to read or write external files or open popups for user interaction. Selenium IDE is only focused on browser interaction (goBack, maximize,...), element interaction (click, type, fireevent,...) and element verification (assertVisible, verifyValue,...). Synchronization gets done automatically via clickAndWait or different waitForXXX functions.

Data-Driven-Testing: 

Since the Selenium IDE is very limited in its possibilities according to its functionality beside the browser interaction, dynamic testing like Data-Driven-Testing is not possible.

Compatibility: 

The Selenium IDE is available for Firefox on every platform, so if you can run Firefox, you are able to run the Selenium IDE.

Conclusion - Selenium IDE: 

Selenium IDE is an easy and quick solution to create an run browser tests inside Mozilla Firefox. The functionality is limited but covers the most important requirements.

2 comments:

  1. I was very much confused what to do next in my career, but after going through this article I got a clear version of undergoing Selenium Training from Selenium Course in Chennai

    ReplyDelete
  2. The above article "Selenium IDE" is more informative. This is more helpful for our selenium training in chennai. Thanks for sharing

    ReplyDelete