write script for , launching fr window,login and create 5 elements array and store 5 order numbers inthat array?
and open order by using order no.s in array and find out maximum tickets booked by which order?



write script for , launching fr window,login and create 5 elements array and store 5 order numbers i..

Answer / yamini

Tried to display the no. of tickets for each order but work out the solution to retrieve the maximum number of tkts booked. Thanks



Dim Arr, Tktcount
Arr=Array("1","2","3","4","5")
For Each Element in Arr
systemutil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set "John"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").Click
Wait(4)
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set Element
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Tktcount = Window("Flight Reservation").WinEdit("Tickets:").GetROProperty("text")
msgbox Tktcount
wait(2)
Window("Flight Reservation").Close
Next

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More QTP Interview Questions

What is meant by Pseudo Code?

5 Answers   Satyam,


how can u put synchronization point in qtp,wat is exactly synchroniztion why we use it wat is benifit in qtp

13 Answers   College School Exams Tests, Mind Tree,


I have a tool bar where 5 different buttons are placed, but these buttons are not traceable hence i have created a virtual object on save button of this toolbar. Now pls tell me how to use this virtual object while write script.

0 Answers   IBM,


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

0 Answers  


What is the difference between QTP 8.2 and QTP 9.2

1 Answers  






In google i'm going to search something like "rose", i usually get 10 results in the first page and in 2nd page 10 results and in 3rd 10 results so on upto 10th page 10 results. so if i want to open all the 10 pages 10 results i.e., 100 results and close..what is the DP for this? pls can anyone answer my Question..PLZZZZZ...

4 Answers   Indium Software,


What is the differnce between action & script

1 Answers  


Could you please any body help me.for example in web table in the first row and first column there are 3 links like l1,l2,l3 having indexes 0,1,2 but second time links will change their order like l2,l3,l1 and indexes also changed how can we handle this situvation with script....

2 Answers  


Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

0 Answers  


What issues come up in test automation, and how do you manage them?

0 Answers  


In Login two edit box which object class property value is same, How to enter into 2nd edit box in qtp by vbscript.

3 Answers  


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

0 Answers  


Categories