Record and play sample script in selenium ide

 Now all you are familiar about selenium IDE software testing tool bar and its different components. Now lets we record and play sample script in selenium IDE software testing tool. Follow bellow given steps to record script in selenium IDE software testing tool.

Recording sample script in Selenium IDE

  • Open new tab in Mozilla Firefox browser.
  • Open selenium IDE software testing tool.
  • Click on “Record” button. (Please note here. It will start recording all navigation and action once you click on “Record” button.
  • Now enter URL “https://www.google.co.in/” in your browser. (Selenium IDE will record that action. Make sure your recording is working fine.)
  • Click on “Images” link displayed in main menu.
  • Click on “Maps” link displayed in main menu.
  • Click on “Play” link displayed in main menu.
  • Stop Selenium IDE recording by clicking on “Stop Record” button. Your recording is completed now.
  • My script will looks like bellow in selenium IDE.

New Test
Command Target Value
open https://www.google.co.in/
clickAndWait css=#gb_2 > span.gbts
assertTitle Google Images
clickAndWait css=#gb_8 > span.gbts
assertTitle Google Maps
clickAndWait css=#gb_78 > span.gbts
assertTitle Google Play

Now Save your script into your computer for future use.

Note : Selenium IDE software testing tool is designed to support only web application testing. You can not test desktop or mobile applications using selenium IDE. If you want to test mobile application then you need to use webdriver.

Play sample script in Selenium IDE
It is easy to play script in selenium IDE if it is recorded perfectly. You can play your script by simply clicking on “Play current test case” button in selenium IDE. Once you click on that button, It will perform all those actions which you have recorded on your browser.

20 thoughts on “Record and play sample script in selenium ide

  1. Hi.. thanks for the post. I am new to selenium and recorded the script as per the steps above. But the script looks different. Here is the how it looks than what is given the table in post –
    Sample_test_script
    open /
    click css=a.gb_s.gb_h
    clickAndWait css=#gb8 > span.gb_h
    click css=a.gb_s.gb_h
    clickAndWait css=#gb78 > span.gb_h
    click css=a.gb_s.gb_h
    click css=#gb1 > span.gb_h

    My script does not have AssertTitle command

  2. You need to identify the exact CSS Element using Firebug tool , then try with that CSS web element , then it will work i guess!!!

Leave a Reply

Your email address will not be published. Required fields are marked *