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 comments:

  1. Thanks for the post well written. Its of great help! :)

    ReplyDelete
  2. the post is very meanful.

    ReplyDelete
  3. 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

    ReplyDelete
    Replies
    1. Think, AssertTitle commands were manually added. They are for checking if Title is correct.

      Delete
  4. Clickandwait css=a.q.qs

    [error] Element css=a.q.qs not found
    error is coming help when we are searching and changing tab

    ReplyDelete
  5. I heard that the selenium can only record the navigations. Is it possible to get the file name that the code is calling

    ReplyDelete
    Replies
    1. Not get your question properly. Which file name you need?

      Delete
  6. If I need to record an audio file, which is played with mouse over..... is it possible?

    ReplyDelete
  7. I'm getting "[error] Could not connect to Selenium Server. Have you started the Selenium Server yet?". Please advise.

    ReplyDelete
  8. Hi, i am new one for selenium, could any one tell me the follow of the selenuium

    ReplyDelete
  9. Hi, i am new one for selenium, could any one tell me the follow of selenuium

    ReplyDelete
  10. is it possible to use selenium ide and selenium webdriver for banking application?

    ReplyDelete
  11. is it possible to do testing using selenium ide and seleinium webdriver for banking application?

    ReplyDelete
  12. I am getting this error
    [error] Element css=a.gb_b.gb_Pb not found
    Can anyone pls help me

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

      Delete
  13. clickAndWait css=#gb_2 > span.gbts step is getting failed all the time

    ReplyDelete
  14. Useful information. But, English is bad.

    ReplyDelete
  15. Useful information. But, bad English.

    ReplyDelete
  16. this script not run because you must put a "pause" command (example, pause 2000) for exist an interval time between lines .

    ReplyDelete