How to pass parameters from one test to another test in QTP

Questions by satishnaiduk

Showing Answers 1 - 2 of 2 Answers

Gopi Krishna

  • Mar 7th, 2006
 

Hi

I am giving one exmple passing the values into 2 actions

Step1 : U will select the Action1 Properties and set input and output       

           parameters

'Action1 Script

Dim sum

sum = Parameter("t") 'Input parameter

msgbox(sum)

Parameter("a")=89 'Output Parameter

Step2 : Go to Action2

'Action2 Script

RunAction "Action1", oneIteration,"20",x

Msgbox(x) ' First Action Output parameter comes to Action2 Automatically

exitrun()

  Was this answer useful?  Yes

suresh09

  • Jul 20th, 2009
 

There are many ways to send data.

Test 1:Create Environment variable in action1 and make that action resuable.
Test 2:Create action2 and use the variable.

When more data needs to be send we can pass the entire data to excel sheet and we can retrieve that data in another action in another test.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions