Pass input and output parameters for action

2,124 views
Skip to first unread message

QTP Beginner

unread,
May 14, 2012, 5:12:27 PM5/14/12
to Mercu...@googlegroups.com


---------- Forwarded message ----------
Hello all,

  I am new to QTP.I am practising action parameters.I have 4 actions for login(to login into flight application),flightReservation(for inserting order),openOrder(open the order which was placed in flight reservation) and Logout(for closing flight reservation).
  In the flightReservation action i have given ordernumber as output parameter and this should be input parameter for openOrder action
When i run the script i am getting order number as 0 (default value of input parameter)
  
My question is how to pass output parameter of one action as input parameter to other action?

flightReservation action:
   ..
....
Window().WinButton(Insertorder).click
wait 5
orderNum = window(Flightreservation).WinEdit(OrderNum:).getROProperty("text")

openOrder action:
 ...
Dialog(OpenOrder).winCheckBox(Orderno:).click
Dialog().winEdit("Ordernumber").set Parameter("orderNum")

Thanks

Amit Kumar

unread,
May 15, 2012, 2:19:41 AM5/15/12
to mercu...@googlegroups.com
Pass parameter as

RunAction <Action name>, oneiteration, input parameter1, input parameter2, input parameter3, output parameter1, ..


--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

vamsi reddy

unread,
Jul 5, 2012, 4:08:28 AM7/5/12
to mercu...@googlegroups.com
Action 1 - 
RunAction "Action2", oneIteration,order_number

in Action2
Edit Action-Action properties--Parameters--

Name - order_number
Type - Number,Click OK

order_no = parameter("order_number")

Use order_no wherever you want

--
Vamsi Reddy

 
 
 

Reply all
Reply to author
Forward
0 new messages