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

How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance

2 Answers   BirlaSoft,


Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

0 Answers  


How do you move objects from local object repository to shared object repository???What are methods?

1 Answers  


Could you suggest me best coaching for automation in Delhi or nearby area?

0 Answers  


Whether qtp 9.0 supports Test director8.0

0 Answers   TCS,


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

0 Answers  


With help of object repository,we can able to write the descriptive program manually?

1 Answers  


Generic function to search for the unique link in webtable and click on it

0 Answers  


how can we group that these test cases only should be automated and in which order you execute that test cases

3 Answers   Maveric, Satyam,


how to add a runtime parameter to a data sheet?

6 Answers  


What are the different recording modes?

0 Answers  


for example u can take ebay or plifcart online shoping web application--------- write acode in vbscript in qtp---- search box and write (iphone6)and click on go button then opened diff prise iphones in next page but u can select 30,000 to 90,000 list pls write code? 

2 Answers   FFASVA, Genpact, Wipro,


Categories