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
How will you test a stapler?
explain how to write vb script in qtp?when will you write own script?
Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version
www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example
What is the difference between Keyword Driven test and Data Driven test?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
What is checkpoint in qtp?
What is the architecture of your project? Can any one answer for this question plz........
how to explain a claims and insurance project?
.have you ever written compiled module? if yes , tell me about some of the function that you wrote.
How to use the object spy in quicktest professional 8.0 version?
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?
What is QTP scenario.
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
What is smart identification in QTP?