Hi All,
Please clarify the below things - Thanks in Advance
Query 1:
->In the flight application Insert Order, Inserted one record
->I want to the return the value Order_Nu from the function
->With in the function Order_Nu is displayed
->Outside the function 'msgbox Order_Nu' displaying empty msgbox
Query 2:
How to use function value in QTP Action
-> I put this function in .vbs associated to action1 in QTP
-> I want to use 'Order_Nu' in Action 1
InsertOrder(A)
Public function InsertOrder(byval Order_Nu )
Window("Flight Reservation").Activate
Window("Flight Reservation").WinObject("Date of Flight:").Type "111112"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Los Angeles"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "vamsi"
Window("Flight Reservation").WinButton("Insert Order").Click
wait 10
' Fetch the order number
Order_Nu=Window("Flight Reservation").WinEdit("Order No:").GetROProperty("text")
'To display the order number
msgbox Order_Nu
' Return value
InsertOrder=Order_Nu
End Function
msgbox Order_Nu