In an Excel sheet take two fields as agentname and password
and type some valid agentname and password.call that excel
sheet in qtp so that qtp opens the flightreservation window
taking into consideration how many records are entered in
the excel sheet.For example if 3 records are entered today
it will open 3 FR windows,if in near future the records are
more than 3 then it will open that number of times.
Answer Posted / nagesh
let take a excel sheet with two feilds agentname and
password , in the first sheet of C:\testdata.xls , and
enter any number of users as you want , this simple example
will help you
DataTable.ImportSheet "C:\testdata.xls",1,1
rowcount=DataTable.GetSheet(1).GetRowCount
For i=1 to rowcount step 1
DataTable.GetSheet(1).SetCurrentRow(i)
SystemUtil.Run "C:\Program Files\HP\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set DataTable.Value
("agentname",1)
Dialog("Login").WinEdit("Password:").SetSecure
DataTable.Value("password",1)
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Activate
Window("Flight Reservation").Close
Next
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Describe synchronization point.
Mention the different actions types of qtp.
Is it possible to use two instances of UFT on the same machine? If not why?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
What is difference between shared and local object repository?
How you know that a test case is a regression test case
Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so
How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?
What is QTP scenario.
Mention the test steps of qtp.
Name the different types of recording modes?
What is Unicode Compatibility?
How to use conditional loops in qtp ?