What is User defined function in QTP
Answer Posted / cheekuri ragini
In QTP after completion of keywords creation for required
objects in SUT, Corresponding test automator can study
testcases to be automated to identify 'repeatable steps' in
those cases.Test automator can automate those repeatable
steps as "User Defined Functions" like shown below.
Syntax: Functionname(arguments)
______________
______________
______________
End Function
In above function arguments are two types. Such as
1. byval
2. byref
ex 1.
function add(byval x, byval y)
x=x+10
y=y+10
End Function
we can store this user difined function in Function Library
folder of CSTAF (frame work)
whenever we required this function in our test script we
can use this user defined function from function library as
like shown below
option explicit
dim a,b
a=10
b=20
add(a,b)
print a
print b
Inthe same way we can pass the arguments by using byref also
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How many ways we can parameterize data in quicktest professional (qtp)?
how can we compare descriptive programing with a regular expression
Explain the differences between table and db checkpoints?
can u please explain what is the exact difference between qtp8.2 and 9.0
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
Explain the check points in quicktest professional?
What is expert view in qtp?
How will you report the bug and explain the defect tracking sheet you handled?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
What is the expert view?
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?
Explain the features and benefits of quick test pro(qtp)?
what QTP Options do you know?
Explain qtp(quick test professional)?
How to use reporter.report event in qtp ?