give me descriptive programing code sample flight
application in qtp?
Answers were Sorted based on User's Feedback
Systemutilrun " Path of the Application "
Dialog("text:=Login").WinEdit("name:=Agent name").set "Chandu"
Dialog("text:=Login").WinEdit("name:=Password").set "mercury"
Dialog("text:=Login").WinButton("name:=OK").click
If Window("text:=Flight Reservation") Exists
Then
Window("text:=Flight Reservation").close
Else
Dialog("text:=Login").Winbutton("name:=CANCEL").click
Regards,
Chandu
Correct me if i was wrong
Is This Answer Correct ? | 15 Yes | 5 No |
Answer / k
Dialog("text:=Login").Activate
Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "kasi"
Dialog("text:=Login").WinEdit("attached text:=Password:").Set "mercury"
dialog("text:=Login").WinButton("text:=OK").Click
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / chandrasekaran
Systemutil.Run "Give the Path"
Dialog("Login").WinEdit("Agent Name:").Set Chandru
Dialog("Login").WinEdit("Password").SetSecure "Mercury"
Dialog("Login").WinButton("OK").Click
If(Window("Flight Reservation").Exist) Then
Reporter.ReportEven Micpass, "Login into the
Application","Successful"
Else
Reporter.ReportEven MicFail, "Login into the
Application","UnSuccessful"
End If
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / saket j
As in Answer 5:
I have ran that script but getting error that object not
found in Object reposotory.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / srikanth
Dialog("text:=Login").WinEdit("name:=Agent
name").set "srikanth"
Dialog("text:=Login").WinEdit
("name:=Password").set "mercury"
Dialog("text:=Login").WinButton("name:=OK").click
If Window("text:=Flight Reservation") Exists
Then
Window("text:=Flight Reservation").close
Else
Dialog("text:=Login").Dialog("text:=Flight
Reservation").Winbutton("name:=OK").click
Dialog("text:=Login").Winbutton("name:=CANCEL").click
Is This Answer Correct ? | 7 Yes | 6 No |
Answer / vrvs
Browser("name:=Mercury \|FlightApplications").Page
("title:=FlightApplications").Exist
Dialog("text:=Login").WinEdit("name:=Agent
name").set "srikanth"
Dialog("text:=Login").WinEdit
("name:=Password").set "mercury"
Dialog("text:=Login").WinButton("name:=OK").click
If Window("text:=Flight Reservation") Exists
Then
Window("text:=Flight Reservation").close
Else
Dialog("text:=Login").Dialog("text:=Flight
Reservation").Winbutton("name:=OK").click
Dialog("text:=Login").Winbutton("name:=CANCEL").click
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / chandan
Systemutil.Run "C:\Program Files\HP\QuickTest
Professional\samples\flight\app\flight3a.exe"
str=Dialog("nativeclass:=#32770","text:=Login.").Exist(2)
Dialog("nativeclass:=#32770","text:=Login").WinEdit
("attached text:=Agent Name.*").set "mercury"
Dialog("nativeclass:=#32770","text:=Login").WinEdit
("attached text:=Password.*").set "mercury"
Dialog("nativeclass:=#32770","text:=Login").WinButton
("nativeclass:=Button","text:=OK").Click
Is This Answer Correct ? | 1 Yes | 3 No |
Answer / ashok reddy
Browser(name:=Mercury \|FlightApplications).Page
(title:=FlightApplications).Exist
Is This Answer Correct ? | 5 Yes | 13 No |
write a script to verify the image path(src property) of the images which are in web pages.
Will down time for server and content maintenance/upgrades be allowed? how much?
explain virtual object? in detailed? pls any one explain me?
how can i impliment error handling in QTP?
In QTP what is the difference between Step-in, Step-out, Step-over ?
Is it possible to call out to Java from QTP?
How to add a runtime parameter to a data sheet?
Explain the types of object repositorys in qtp?
How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")
How to create an Action Template?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
can i able to connect any version of qtp to any version qc