Hi All
Below is my script which i made for lgin into Flight.exe.

SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"

Dialog("Login").WinEdit("Agent Name:").Set DataTable
("p_Text", dtGlobalSheet)

Dialog("Login").WinEdit("Agent Name:").Type micTab

Dialog("Login").WinEdit("Password:").SetSecure DataTable
("p_Text1", dtGlobalSheet)

Dialog("Login").WinButton("OK").Click

If Dialog("Login").Dialog("Flight Reservations").WinButton
("OK").exist Then

Dialog("Login").Dialog("Flight Reservations").WinButton
("OK").Click

datatable.Value(3)= "Incorrect password. Please
try again"

Dialog("Login").WinButton("CANCEL").Click

elseif Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").exist Then

Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click

datatable.Value(3)="Please enter agent
name"

Dialog
("Login").WinButton("CANCEL").Click

elseif Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").exist then

Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click

datatable.Value(3)= "Please
enter password"

Dialog("Login").WinButton
("CANCEL").Click

else Window("Flight Reservation").Move 309,146


datatable.ExportSheet "C:\Raj\Result.xls" ,1

Window("Flight
Reservation").Close

End If


I want to capture the Message string from
Dialog("Login").Dialog("Flight Reservations"

Also pls let me know if this is the right way to do the
script for login. Pls provide some script for login
Flight.exe

Thanks in advance

Raj Dhiman



Hi All Below is my script which i made for lgin into Flight.exe. SystemUtil.Run "C:\Program..

Answer / raju

R u thinking is Good.

U will follow few steps:

1). u will store all the object information in object
repository.
2). u will give wrong password and click on "OK" Button
3). after that u got one dialog window that window also
stored into the object repository.
4). u will give valid username, password and click on "OK"
button.
5). u got window flight reservation window. This window
also stored into the object repository. After that u
Generate the script.

if not dialog("Login").exist(2) then
invokeapplication "Path of Flight Reservation"
End if

dialog("Login").winedit("Agent Name").set datatable(1,1)
dialog("Login").winedit("Password").set datatable(2,1)
dialog("Login").winbutton("OK").click

if dialog("Login").dialog("Flight Reservation").exist(2)
then
dialog("Login").dialog("Flight REservation").winbutton
("OK"). click
dialog("Login").winbutton("Cancel").click
datatable(3,1)="Fail"
else
window("Flight Reservation").close
datatable(3,1)="Pass"
end IF

datatable.exportsheet "Path",1

i think this is working properly
if u have any quarries please mail me raju.ippali@gmail.com
my no is 9823257761

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

I have the script like this: Browser("Philips Web Login").Page("Philips CL DMS2 Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. If i want to get that value "DC3701737" in to a variable, how? pls let me know if you didn't get the question. Help me out in this.

2 Answers  


For example one window is there the window contain some of Check boxes but my question is how many check boxes are there particular window? Please solve the problem gi_raju@rediffmail.com ippaliraju@yahoo.co.in

3 Answers  


Is it possible to map an image as standard Object or u've to treat as virtual? how to map an Dynamic image into standard object?

1 Answers  


how qtp handles customised object

1 Answers  


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1 Answers  






waht is the difference between QTP 8.2 and 9.0 version

15 Answers   AppLabs, CTS, Polaris,


How do client side image and server side image work?

0 Answers  


Difference between action & Reusable action?

0 Answers  


In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples?

2 Answers   TCS,


How can you pass value one action to another action?

0 Answers  


1.how can we report the QTP test result in a different excel sheet 2.

3 Answers   Aurigo,


Please explain me in detail! How to handle runtime errors in QTP useing recovery senario or with out scenario

5 Answers   Quinnox,


Categories