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.
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"
[color="red"]'here u have to enter valid date[/color]
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)
[color="magenta"]a=window("text:=flight reservation").winedit("attached text:=order no:").getroproperty("text")[/color]
msgbox "thankyou. Your order no - "&a
datatable(1,1)=a
[color="magenta"]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)[/color]
Re: In QTP how to get visible order no in data table
Thank you very much I will try this script.