QTP/UFT: Input and Output Parameter


”##Create Test (Start) Parameter “myPin”
”##Create Action (Action1) Parameter “enterPinNumber”
”## Set the Parameter
Dim enterPinNumber
enterPinNumber = TestArgs(“myPin”)
‘msgbox enterPinNumber
”## Run Test with Test Parameter
PbWindow(“w_Pb_frame”).PbEdit(“Pb_edit”).SetSecure enterPinNumber

”## Run Action with Action Parameter
RunAction “openApp [open_Application]”, oneIteration, Parameter(“inputParameter”)

”## Create a Output Parameter “userIDNo”
”## Get the “idNum” Value at RunTime
idNum = trim(PbWindow(“w_Pb_frame”).PbWindow(“w_Pb_frame”).PbDataWindow(“dw_window”).GetCellData (11))
”## Set the Output Parameter Value
Parameter(“userIDNo”) = idNum

”## Select a Power Builder Cell that match from QTP/UFT Runtime Data Table
PbWindow(“w_Pb_frame”).PbWindow(“w_Pb_frame”).PbDataWindow(“dw_window”).SetCellData “#1”,“lastname”,DataTable.Value(“LastName”,addNewUser)
”Return Output Parameter “newUserLastName”
Parameter(“newUserLastName”) = DataTable.Value(“LastName”,addNewUser)

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s