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
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
How to integrate the qualitycenter with qtp
What is reusable action?
Hi! My OTP script has several bitmap checkpoints included which I check in the test results xml file. The test is for SAP 4.7. I need to save these bitmaps to files or at least export them to the html file using the export function in the test results viewer. Could you please help me with this problem? Thank you in advance! Best regards, Peter
How to creating an output value using quicktest professional (qtp)?
Explain types of descriptive programming?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
For which type of project the iterative model is suitable?
assume i have few url link how will i dynamically call then using descriptive programming?
What are the types of data tables in qtp?
What is the file extension of the code file and object repository file in QTP?
Which functionalities of QTP used in banking project? pls any say answer?
Is it possible to merge two object repository files in qtp?
What are the flaws in water fall model and how to overcome it?
Output values? i want a practical example