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 |
what is meant by Implicit and explicit requirements?
How can you delete the results file (XML)
How should I get results when I run scripts in a Batch mode
Is it possible to change the name of a test object. I mean when we are recording the script for an object (for Ex: Username is a text field which has value "Babu",i am recording that). Then the Name of the object will become "Babu" in object repository. If i want to change "babu" as "xxxxx" .. is it possible to do? Pls help me in this .. if you didn't understand the question, pls let me know.
how to test load test and block box testing an a web based application pls give ans briefly
What is contained in the object repository?
why we are using environment variables instead of global variables?
How to check the URL using Automation tool QTP
How to analyzing test results using quicktest professional?
Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.
What is an object repository?
Why qtp always start action1 and does not start action?