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
in my application,validation message has in japanise language.how to validate this message is appears properly or not
what could go wrong with test automation?
What are the types of properties that quick test learns while recording?
How to connect to a database?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
when will you do debug your script? and explain that process?
what is run-time data?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
How can I change object description or check point values in qtp?
Problem with XML checkpoint in QTP ?
how to create flat file datasubmission in qtp
How do you capture tooltip using QTP?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
Can any one send me the QTP Basic Coding Samples?