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

In the website, the protocol has been changed http: to https what you will do? Tell me your approach?

969


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

2168


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1804


How to add verification steps to tests?

9689


How u will do versioning in QTP?

1836


Explain Descriptive Programming Types with Examples?

1428


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

8035


How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?

1107


Hi we are using QTP9.0 for Seibel Application and this seibel application will give you a popup messagebox which is of web , so qtp takes 3 mins to recognize the messagebox and to click on it , we have more number of messageboxes like this . please suggest me some solution

2081


Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)

2041


Explain more about the Test Fusion Report of QTP?

982


How can you identify the browser and its information using QTP script?

970


How to use setroproperty?

951


Explain the types of object repository?

938


What is data driver in qtp?

951