What is User defined function in QTP
Answers were Sorted based on User's Feedback
Answer / ratheesh
user defined function is nothing but ,u can define ur own
fuction for particular functionality.
Normaly we will create user defined functions for the
reusable functionality(which is available in ur
application)
| Is This Answer Correct ? | 11 Yes | 2 No |
User defined function is nothing but we write our own
functions to perform set of action which contains a login to
execute some steps on the application without making use of
inbuilt qtp functions or which contain full logical code by us.
For. Eg:
If you need to do some arithmetical operation and just
return the value to some object (textbox) or some thing
else. Then write a funcion on ur own and pass the value to
do the operation and that's it.
Similary if u want to do some event handling like check,
click, select object, do some decission making etc. based on
return value u can make use of functions effectively.
Hope ur got the answer.
Thanks & Regards
Arun*
BOSTON, USA
| Is This Answer Correct ? | 9 Yes | 4 No |
Answer / bfakruddin
Who mark that arun answer as wrong,
he given nice answer, yes we can make qtp to perform an
action based on return value of function.
User Defined Function: It is a block of statements which is
used to perform particular task and get a return value,
which is reusable code put in the function and call at ur
desired place, and get the return value of your input
parameters.
make the qtp to do action based on that return value. use
that value at your desired area.
thanks
Baba Fakruddin
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / pallavi
User defined function is nothing but block of code using
repositories for a particular application in which we have
to pass parameters (which are used in the function)to the
function by which we get the return value as output (Boolean
value).
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / 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 |
Answer / sreeprasad
User defined functions are encapsulation of segments of
code which is used several times in the script.They can be
either within the QTP script or can be maintained in
external .VBS or .TXT files.
| Is This Answer Correct ? | 5 Yes | 6 No |
where is the bitmap checkpoint be saved
How the automated tests in org
Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?
What are the types of Object Repository’s in QTP?
I know the Basic QTP. But I wanted to learn descriptive programming in QTP. Without Object Repository how we can develop a script? I wanted to do one real time project using QTP. If you know this type of training is available in pune then let me know the address.
Which company is better amdocs or techm ???
can any one tell me How exactly data drivent testing is done in.explain with any example and the exact steps to fallow?
According to use, how virtual object is different from object spy? If Qtp is not learning a sub-menues. What should we done? how would we manage on the expert view too? alkaa.dugaal@gmail.com
can anyone answer this question ........in the DICTIONARY OBJECT....i created the dictionary object in reserved object ok....here i have some sets of values ...now i want to retrieve the item i done too ok.......here my question is now i saved the test and close the qtp tool ,again i opened now i retrieve the same item in the dictionary is it possible ????. friends when i try to do this i am getting empty message box i mean no value will be retrieved ......ans me any one plz...
What are the factors on which script execution time is dependent?
explain how to write vb script in qtp?when will you write own script?
w is output value