-
Contributing Member
In QTP how to get visible order no in data table
Hi
I am new in QTP. I have a trial version and i was trying to captured order no in my data table.I put stander out put on order no. I use variable top of the script "Dim onum"
onum=Window("Flight Reservation").Win Edit("Orer No".GetVisibleText()
Anyone can please tell me above variable is right or not and how am i supposed to get visible order no in my data table.
-
Expert Member
Re: In QTP how to get visible order no in data table
You can try this. This is a descriptive programing for end to end transactions for flight reservation window. 'to login and insert a order in flight rreservation window and 'know the order no dim a
systemutil.run "c:\program files\mercury interactive\quicktest professional\samples\flight\app\flight4a.exe"
dialog("text:=login").activate
dialog("text:=login").winedit("attached text:=agent name:").set "rajaputra"
dialog("text:=login").winedit("attached text:=password:").set "mercury"
dialog("text:=login").winbutton("text:=ok").click
window("text:=flight reservation").activate
window("text:=flight reservation").winobject("attached text:=date of flight:","window id:=0").type "12/12/07"
'here u have to enter valid date
window("text:=flight reservation").wincombobox("attached text:=fly from:").select"london"
window("text:=flight reservation").wincombobox("attached text:=fly to:").select"los angeles"
window("text:=flight reservation").winbutton("text:=flight").click
dialog("text:=flights table").activate
dialog("text:=flights table").winlist("attached text:=from","window id:=2001").select"19095 lon 10:24 am lax 01:54 pm af $173.47"
dialog("text:=flights table").winbutton("text:=ok").click
window("text:=flight reservation").winedit("attached text:=name:","window id:=1014").set"rajaputra"
window("text:=flight reservation").winradiobutton("text:=business").click
window("text:=flight reservation").winedit("attached text:=tickets:","window id:=1029").set"2"
window("text:=flight reservation").winbutton("text:=&insert order").click
wait(10)
a=window("text:=flight reservation").winedit("attached text:=order no:").getroproperty("text")
msgbox "thankyou. Your order no - "&a
datatable(1,1)=a
if you want the order no to be outputted into a datatable, first of all you change the column name (as order_no) of the datatable by double click on that(a)
Last edited by rajaputra; 11-11-2007 at 12:32 PM.
-
Contributing Member
Re: In QTP how to get visible order no in data table
Thank you very much I will try this script.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules