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


Please Help Members By Posting Answers For Below Questions

What is optional step in qtp? How you can add optional step in qtp?

547


I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.

1527


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

633


What are the recording modes in qtp?

593


Have you done batch testing in qtp? If yes how you are doing?

521






is there any addin for remedy user application

1752


What are the different recording modes and how do they work?

624


What are the various types of Actions in UFT?

602


In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer

1954


How to use Environment parameterization? Explain with an example.

1489


Explain advantages and disadvantages of ddf?

607


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1534


Explain how you can find the absolute value of the number in qtp?

658


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

1573


what frame work you are following?

1540