Selenium IDE Tutorial and download

Selenium-IDE

Selenium IDE is record and play back tool for testing web applications. With the Selenium IDE, you can record user interactions with the web application and play them back to test the errors. In this post, we will learn the basics of Selenium IDE and its features.

Why Selenium IDE ?

We have learnt in detail about selenium in the previous post . IDE is a Firefox add-on for recording and playing back Selenium scripts with Firefox. It’s a great tool to start learning Selenium.

It’s an open-source software that works on all three major platforms i.e. Windows, Mac and Linux.

Good News is that you do not need any knowledge of Test Scripting language. First get familiar with IDE and then you switch on to advanced selenium i.e. Webdriver. just follow the below steps for quick start.

Only 5 steps 🙂

Selenium-IDE-in-5-steps

Installing Selenium IDE :

As it is a Firefox Add-on, It is quite easy to install IDE. Listed below are the steps for installation. Also, Refer below video for installation reference.

1. Go to the link Selenium IDE download
2. Scroll down to Selenium IDE and Download latest released version.
3. Firefox shows a prompt, just click ‘Allow’.
4. Proceed with installation and Restart firefox.


Look and Feel of IDE :

After installation go to the Tools>> Add Ons >>Extensions and you should see Selenium IDE along with language formatters for C#, Java, Python, Ruby. Which means selenium IDE installed successfully. To open IDE, Go to Tools/Selenium IDE or use shortcut Ctrl + Alt + S.

Selenium IDE Features

  • The ‘Base URL‘ shows the URL on which the test is being performed.
  • The ‘Tool bar‘ has ‘Play’ buttons and slider which dictates how fast/slow the playback to be for the recorded test and .
  • The ‘Test Suit pane‘ has all the list of test cases for one Test suite.
  • The bottom pane shows a ‘log‘ of actions and a reference list.
  • The Red button at the rightmost edge is the ‘Record’ switch. By default it is in ‘Recording Mode’.
  • The ‘Test Pane‘ will show a list of actions recorded as part of the test.
  • The ‘Editor‘ is to make enhancements to the scripts.

Record and Playback :

In this section we will learn how to record user actions and playback the recorded script on a eCommerce website.

Steps to do so:
1. Open firefox browser.
2. Navigate to Website
3. Open selenium IDE (recording starts by default).
4. Do Some shopping.
5. Stop Recording and Save the script.
6. Play back the recorded script.

Please refer below video for reference.

The recorded script looks like the below image. If you closely observe the code quite readable and easy to understand. It just types, Click on a link and waits, Selects the required option and so on. Keep going!

Selenium-Recorded-Code

Enhancement – Adding life to script

We recorded the script and played it back successfully. But most times we face issues and script does not work properly. This is because ‘Page failing to load in time’, or ‘Incorrect URL’, or ‘Incorrect page’ etc. To overcome such instances we need to enhance the script for better usability. Selenium IDE has some available commands which resolves such errors.

Let us take the recorded script and add one command ‘VerifyTitle Madison Island’ from the list of commands. This will verify that script is in correct page before moving on to next step which would eliminate the error ‘Incorrect page’.

Selenium IDE enhancement

To add the command right click on the page >> show all available commands >> Verify Title madison

Now Rerun the script and check that the added step has passed (in green). Which means the script has verified that its the correct page and completed the rest of the steps. If its red its the other way. That’s not all, there are various commands available to make script more lively.

Selenium IDE Commands

Some of the commonly used Commands are

open, click/clickAndWait, verifyTitle/assertTitle, verifyTextPresent,
verifyElementPresent, verifyText,verifyTable, waitForPageToLoad,
waitForElementPresent

Next Steps :

Selenium IDE offers different other options such as Editor where user can edit the script to his needs. Also, the recorded code can be exported to WEBDRIVER for next actions. In the further posts under selenium category, we will be learning about Selenium Webdriver.