Explain me how to write the Descritive programming in qtp using sample filght application?

Questions by PrabhuSparks   answers by PrabhuSparks

Showing Answers 1 - 3 of 3 Answers

Jishnu

  • Oct 4th, 2007
 

Try this....

invokeApplication"C:Program FilesMercury InteractiveQuickTest Professionalsamplesflightappflight4a.exe"
window("text:=Login").Activate
window("text:=Login").winedit("attached text:=Agent Name:").Set "Jishnu"
window("text:=Login").winedit("attached text:=Password:").SetSecure"mercury"
window("text:=Login").WinButton("text:=OK").Click
Window("text:=Flight Reservation").winedit("acx_name:=MaskEdBox").Set "11/11/11"
window("text:=Flight Reservation").Type micTab
window("text:=Flight Reservation").WinComboBox("attached text:=Fly From:").Select "Denver"
window("text:=Flight Reservation").Type micTab
window("text:=Flight Reservation").WinComboBox("attached text:=Fly To:").Select "London"
window("text:=Flight Reservation").WinButton("text:=Flight").Click
window("text:=Flights Table").WinButton("text:=OK").Click
wait(1)
window("text:=Flight Reservation").winmenu("menuobjtype:=2").Select "File;Open Order..."
window("text:=Flight Reservations").winButton("text:=&Yes").Click
window("text:=Flight Reservations").winButton("text:=OK").Click
window("text:=Flight Reservation").winedit("window id:=1014").Set "ggg"
window("text:=Flight Reservation"). winButton("window id:=1008").click
Dialog("text:=Flight Reservations").WinButton("text:=OK").Click
window("text:=Flight Reservation").winmenu("menuobjtype:=2").Select "File;Exit"

Here what we need to do is to uniquely identify the object using its properties. For this we can use object spy or object identification from the Tools menu.Here for example,to identify the login dialog we use the 'text' property of the object(dialog)( ("text:=Login"). Note the syntax: "property name:=property value". Go thru the above script n u will get it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions