What is User defined function in QTP

Answers were Sorted based on User's Feedback



What is User defined function in QTP..

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

What is User defined function in QTP..

Answer / arun

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

What is User defined function in QTP..

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

What is User defined function in QTP..

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

What is User defined function in QTP..

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

What is User defined function in QTP..

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

Post New Answer

More QTP Interview Questions

IF we use batch testing.the result shown for last action only.in that how can i get result for every action.

2 Answers  


hai friends i already ask this question but when i post the question the alignment goes wrong .....my question is we have a WEB TABLE ....assume that web table having 3 row's and 3 column here in 2nd row 3rd column having VISIT FACEBOOK link...now i want to check the VISIT FACEBOOK link is available or not ..if it's there i want to click the link ...then how to find the web table row or column count ....don't write the excel or data table script here friends .....consider that it's a WEB TABLE do a favour ...thank's

3 Answers  


. Types of properties that Quick Test learns while recording?

2 Answers  


How to "Turn Off" QTP results after running a Script?

4 Answers  


In QTP for .net application which plug in is used? For Java Application which plug in is used ?

2 Answers   AppLabs, Fraze Tech,






Discuss the QTP Environment?

0 Answers  


On what basis we select test cases to automate?

0 Answers  


What is checkpoints for quicktest professional?

0 Answers  


Hi All, I am 4 yrs experieced in manual testing and new to automation tool QTP. Iam trying to learn it thru online and material i have.I am able to understand but unable to trace out which method or function to be used where necessary in VB Script. How come we know the functions or methods to be used to open a window when clicking on button or so...Pls suggest me.How can i proceed further to apt VB Script.

0 Answers  


Batch testing in howmany ways u perfrom in QTP

3 Answers   Lehman Brothers,


How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?

2 Answers  


How many types of actions are there in quicktest professional (qtp)?

0 Answers  


Categories