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
Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji
How to build scripts that access data from external sources?
which type of testing process are you following in ur company? how to recognize a qtp page?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
How to create runtime property for an object?
what is the latest version of QTP? Main difference between 9.2 and 10 version
How many add-ins comes by default with qtp?
What is difference between run time object and test object?
What is the syntax to call one action in another?
How to suppress warnings from the test results page?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
How will you check that your test cases covered all the requirements?
can any body give the banking domain concepts/links
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.