Selenium IDE

Selenium IDE is an automated tool which is use to automate the software (web applications) testing process. It is implemented as a Firefox extension (add-ons), and allows you to record, edit, and debug tests very easily. You can choose to use its recording capability, or you may edit your scripts by hand.

Before going to in detail about tool first let’s see where we can use this tool.

Where to use

It can be use to functional testing of a web application. It allows recording user actions on browser window and play back. If you want to test some part of a web application repeatedly you can use selenium for automate that process. For an example imagine you want to test a form of a web application. Here you must fill that form repeatedly for each time you need to test it. So filling the form each time quickly becomes tedious. You can use Selenium for automate these kind of repeated tests.

Installation of Selenium IDE

1. Download Selenium IDE from link.
2. After downloading you can see it as “selenium-ide.xpi”
3. Just double click that xpi file
4. If it prompt following kind of window just click on Install Now button.

5. Then it prompts a following window saying that Selenium was successfully installed.

6. You need to restart Firefox to complete your installation.

Use Selenium IDE

After installing Selenium you can access it through Firefox

Then it prompts a following window

By default recording is activated. If it is not you can activate recording by clicking on the Record button.

Then browse the and type Java Programming in search field of the Google (browsing Google and searching Java Programming is just use for demonstration purposes)

You can notice that Selenium will record all your actions in the browser.

Google will show you the possible results for your searching. Then click most top result Google shows, which is most probably link for a Wikipedia.

Then again click on the record button in Selenium window to stop the recording. Now you should see something like below.

Above showed ‘click’ commands should be needed to correct as ‘ClickAndWait’. For correct this click on the source tab. Then replace ‘click’ with ‘ClickAndWait’ as follows.

After change those values in source again click on the Table tab and now you can see your changes.

Now open a new tab on your browser and Click “Play entire test suite button” in Selenium IDE.

So you can notice that it automatically follow the way you followed to browse Java Programming in Wikipedia.

Click on the last line below the last ‘ClickAndWait’ command and select ‘assertTextPresent’ from Command drop down list. Then type “Sun Microsystems” in Target text field. Here aim is to check whether corresponding page contains the “Sun Microsystems” words.

Imagine if you type something like ‘Database Manipulation’ in the target field. There are no any words saying Database Manipulation in Wikipedia’s corresponding site. Therefore Selenium shows the failure.

So this is a simple example to show how to use Selenium IDE for automate your functional testing of a web applications. Near future I’ll explain to you how to use Selenium in advance.