02-09-2009, 11:34 PM
Hi ,
Find the following way :
Step 1 :
Create 3 Actions
1)Login ---> 3 rows of data in global sheet of datatable(3 userNames & pwds)
2)Insert_FlightOrder --> 3 rows of data in Localsheet of Datatable ( 3 different filght dates )
3)Exit
Step2 :
Go to Keyword View -> Select "Insert_FlightOrder" Action --> Right Click "Action Call Properties" --> Choose "Run on All rows"
Step3 :
Now execute the script & see .... it will work as expected
_________________________________________________________________________________________________________
FYI...Find the entire code for your requirement given below :
Code for "Login" Action :
Code for "Insert_FlightOrder" Action :
Code for "Exit" Action :
Find the following way :
Step 1 :
Create 3 Actions
1)Login ---> 3 rows of data in global sheet of datatable(3 userNames & pwds)
2)Insert_FlightOrder --> 3 rows of data in Localsheet of Datatable ( 3 different filght dates )
3)Exit
Step2 :
Go to Keyword View -> Select "Insert_FlightOrder" Action --> Right Click "Action Call Properties" --> Choose "Run on All rows"
Step3 :
Now execute the script & see .... it will work as expected
_________________________________________________________________________________________________________
FYI...Find the entire code for your requirement given below :
Code for "Login" Action :
Code:
invokeapplication "D:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
dialog("Login").WinEdit("Agent Name:").Set DataTable("Uname", dtGlobalSheet)
dialog("Login").WinEdit("Password:").Set DataTable("Pwd", dtGlobalSheet)
dialog("Login").WinButton("OK").Click
Code for "Insert_FlightOrder" Action :
Code:
Window("Flight Reservation").WinMenu("Menu").Select "File;New Order"
Window("Flight Reservation").WinObject("Date of Flight:").Type DataTable("Fight_Date", dtLocalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Los Angeles"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select 0
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "sree"
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinEdit("Tickets:").Set "2"
Window("Flight Reservation").WinButton("Insert Order").Click
wait(5)
Code for "Exit" Action :
Code:
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"