I am just a beginner in QTP. Could any one explain me in
detail how to automate adding two numbers and getting the
result in QTP. Also I would like to parameterize the
inputs. I have tried but getting an error like 'Can't use
sub.....'(can't recollect the exact error)
Answers were Sorted based on User's Feedback
you can write function to add two numbers and call in qtp.
file-->New-->function Library
Public function add(a, b)
add=a+b
End Function
Save it where ever u want with add.vbs
Now File-->settings-->Resources-->Add function library--
>click at add(+) button below one button will appear click
that and add the saved library file(add.vbs).
in qtp normal file
write print add(4,5) and u can parameters as your wish.
add this in
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sailaja
One way is:Dim a,b,c
a=10
b=20
c=a+b
msgbox c
Anotherway:Place the input parameters in these: edit-
>Action Properties->Parameetrs->Here we can add input &
outputparametrs.
Dim a1,b1
a1=Parameter("a")
b1=Parameter("b")
c=a1+b1
msgbox c
Aliter: Add the values of both a,b of parameters in Action
Properties.
Is This Answer Correct ? | 0 Yes | 0 No |
How many test scripts are prapare in ur project(HeathCare Insurance).
How to make arguments optional in a function?
Discuss quicktest professional environment?
When should u feel that u can stop testing now? The following are few of the common Test Stop criteria:
what is meant by descriptive programming?
Hi Frriends... I have one Query please give the apropriate ans. when we r working with web based application , the user loggedin page name is changed respect to the username ( Take a exp. Yahoomail.com) .When we use Datadriven test to this scenario ,each time the loggedin page name is changed ...then the script is fail.. at that time wat can do... please give the apropriate ans. Thanx in advance..
What is the extention of Virtualobject
How to find operating system information using the qtp script?
QTP in mumbai
how can we preform retesting(DATA driven test) using function please gine the code for loginpage
How many ways is to parameterize the value?
What is the current version of QTP?