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

Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1830


How to build scripts that access data from external sources?

2130


which type of testing process are you following in ur company? how to recognize a qtp page?

1790


I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?

1840


How to create runtime property for an object?

1989


what is the latest version of QTP? Main difference between 9.2 and 10 version

2145


How many add-ins comes by default with qtp?

1027


What is difference between run time object and test object?

1062


What is the syntax to call one action in another?

1046


How to suppress warnings from the test results page?

1042


Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points

2245


How will you check that your test cases covered all the requirements?

1068


can any body give the banking domain concepts/links

4071


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

1078


Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.

2303