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.

Answers were Sorted based on User's Feedback



In an Excel sheet take two fields as agentname and password and type some valid agentname and pass..

Answer / hari

var=datatable.getsheet(3).getrowcount

for i=1 to var
datatable.setcurrentrow(i)

Is This Answer Correct ?    3 Yes 0 No

In an Excel sheet take two fields as agentname and password and type some valid agentname and pass..

Answer / 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

In an Excel sheet take two fields as agentname and password and type some valid agentname and pass..

Answer / ganesh

I am getting error for
Dialog("Login").Activate

Error: Login Object not found in Object Repository

Could you please tell me how to over come this.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop (i.e. I first connect to remote desktop from my machine in order to run the application). I am able to record the script successfully with QTP running on my machine and application running on remote. However, when i run the recorded script, system fails to run it and indicates me that it does not identify the object. Is it possible to record and play while QTP and AUT are not on same machine?

7 Answers   ABC,


now a days which one is using all companies for qtpscript a)Object Repository based script b)Descriptive program based script c)BOTH

1 Answers  


how you update scripts in qtp?

1 Answers  


What is data driver in qtp? Where we use it?

0 Answers  


How to invoke Mozilla from QTP thru VB Script

2 Answers  






Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,


It is given in the help of QTP 9.2 that we cant debug the scripts. Is there any other way to VIEW, PAUSE and make modifications in the scripts during execution???

0 Answers  


Could we use QTP for java project(Which is develop in Netbeans and My SQL) otherwise which one is suitable?

1 Answers  


How will u test content of an web application with out using chechpoints in QTP 9.2?

3 Answers   CTS,


Which object repository we use in real time and can we merge 2 object repostiory and how?

6 Answers   HCL, Satyam,


Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas.

3 Answers   IBM,


1. IS A VIRTUAL OBJECT USED WHEN THE LABEL IS NOT RECOGNIZED BY QTP

7 Answers   Ordain Solutions,


Categories