Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

1192


How to integrate the qualitycenter with qtp

2282


What is reusable action?

1108


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

2673


How to creating an output value using quicktest professional (qtp)?

1023


Explain types of descriptive programming?

1048


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..

1802


For which type of project the iterative model is suitable?

1780


assume i have few url link how will i dynamically call then using descriptive programming?

2035


What are the types of data tables in qtp?

1014


What is the file extension of the code file and object repository file in QTP?

1111


Which functionalities of QTP used in banking project? pls any say answer?

1888


Is it possible to merge two object repository files in qtp?

1191


What are the flaws in water fall model and how to overcome it?

1064


Output values? i want a practical example

1765