Quality Testing

Quality is delighting customers

Hello, I am new in QTP. Can anyone help me to solve a problem? I have Action1 and Action2. I called Action2 from Action1. In Action2 I have input1, Input2 And Output1 as input and output parameters. In Action 1 I wrote Input1 = 10, Input2 = 30,  Dim Output and then RunAction "Action2", Input1, Input2, Output1. then MsgBox Output1

In Action2 I have --- Parameter ("Output1") =  Parameter ("Input1") + Parameter ("Input2")

But when I execute the test case it only shows 1030 not the addition of the two values. What is the error in the code, can anyone please explain me?

Views: 142

Reply to This

Replies to This Discussion

It is simple.  Usually Parameter accepts only strings hence you are getting 1030 instead of 40.

You need to do INT conversion before Parameter.  Try this:

Int ( Parameter ("Input1")) + Int ( Parameter ("Input2")) 


Thank you for your help


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service