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 ways to configure the application in QTP,Explain
Have you used xml check point in your project?
It seems Interview questions from Ordain Solutions are almost BASIC LEVEL-Easy. I am asking one tough question..(I think.. May be easy for some people) In recorded script the - WebLink("cityinfo") In reality, the WebLink name is "generalinfo" How you can write function to click that changed web link. NOTE: This functin should work with any Dynamic text link. I will post the answer later.
Explain about Standard output value, Text output value, database o/p value, Xml O/p value, Xm o/p Value
Explain the differences between table and db checkpoints?
What is Environment Variable and when we apply this in QTP?
Diff. between keyword driven Data driven testing?
What is a quick test professional?
how we do database testing with qtp using descriptive programming?
22 Answers Nutrins, Rohit Technologies, Symphony, Syntel, TCS,
Hi, I am new to QTP and vb.script.How to start to write vb.script in QTP? Please give me suggestions?
how do u handle an object with out name in our application using QTP 9.2?
what is run action?