Google Search

Saturday, October 12, 2013

Creating First Selenium Script - Day 2

The below steps will help you record your first script in Selenium:

1.       To Record a Web activity, you need to first open the Selenium IDE and start recording (By Default, when you start, Recording is automatically on)


Making Selenium ready for recording


2.       Add a baseurl in the Selenium tool http://www.orbitz.com on the top (See 1 in Snapshot below) and make sure the recording is ON.
3.       Do the activities on the website to book a flight. The activities are as below:
a.       Click on Flight Only
b.      Select Origin
c.       Select Destination
d.      Select Departure Date
e.      Select Return Date
f.        Click Search.
4.       Once you complete these activities you can see that there are some steps recorded in Selenium (See 4 in snapshot below), these are actually the steps you recorded. Now stop the recording and save the test Case.
5.       To verify that the recording is correct, you can replay the script by clicking the ‘Play Current Test Case’ Button (See 3 in Snapshot below). Once you click that you will observe, that search is on. It is advised to lower the speed of execution (See 2 in snapshot) to observe the test progressing through different steps.

6.       The final script looks as in the Snapshot. (See 4 in script below)



No comments:

Post a Comment