Record and play sample script in selenium ide
Now lets we record and play sample script in selenium IDE. Follow bellow given steps to record script in selenium IDE
Recording sample script in Selenium IDE
- Open new tab in Mozilla Firefox browser.
- Open selenium IDE.
- 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 our 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 is designed to support only web application testing. We can not test desktop or mobile applications using selenium IDE. If we want to test mobile application then We need to use webdriver.
Play sample script in Selenium IDE
It is easy to play script in selenium IDE if it is recorded perfectly. We can play our script by simply clicking on "Play current test case" button in selenium IDE. Once we click on that button, It will perform all those actions which we have recorded on your browser.
No comments:
Post a Comment