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 script for database check point, bitmapchek point, regular expression ?
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How to get the particular property value?
Why script error occur in between recording in qtp?
What are the types of environment variables in qtp?
Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri
"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...
What is keyword view?
Hi, I am using OutputCheckPoint and I am storing the value in the data table. The stored value for column:bedroom:"Bed:4" The another value for column:bathroom:"Bath:2 Full,1 Partial" I need only the no 4 from the first column. I need only the no 2,1 from the second column. I used split array,but it also show array(0) has the value"bed:4" ..... Even though I highlight only 4,It is seleting the full value "bed 4".How can I get only the nos Thank you Uma
I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.
how will you load the test cases in ddt?
what is error and fault in terms of software quality?
Explain the Different types of QTP test assets and their extensions?
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.
What is different command used in command Prompt while using QTP?