Pages

Saturday, 19 September 2015

Record and play sample script in Selenium IDE 

DAY 1

Creating First Selenium IDE Script

The entire script creation process can be classified into 3 chunks:

Step #1: Recording – Selenium IDE aids the user to record user interactions with the browser and thus the recorded actions as a whole are termed as Selenium IDE script.

Step #2: Playing back – In this section, we execute the recorded script so as to verify and monitor its stability and success rate.

Step #3: Saving – Once we have recorded a stable script, we may want to save it for future runs and regressions.

 Recording sample script in Selenium IDE

  1. Open new tab in Mozilla Firefox browser.
  2. Open selenium IDE.
  3. Click on "Record" button. (Please note here. It will start recording all navigation and action once you click on "Record" button.
  4. Now enter URL "https://www.google.co.in/" in your browser. (Selenium IDE will record that action. Make sure your recording is working fine.)
  5. Click on "Images" link displayed in main menu.
  6. Click on "Maps" link displayed in main menu.
  7. Click on "Play" link displayed in main menu.
  8. Stop Selenium IDE recording by clicking on "Stop Record" button. Your recording is completed now.
  9. 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

No comments:

Post a Comment