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

Hi PLZ explain User Defined Functions in QTP with eample?

Answer Posted / amarendra kothuru

Functions - two types
1)Buitin - Prepared by QTP
2)User Defined - Prepared by programmer/tester

Syntan to creat User defined function in QTP

Function FunctionName(Parameter1, Param2,.....)
Statement1
Statement2
.....
.....
End Function

Example:

Function Bigger(value1, value2)
If value1 > value2 Then
Bigger = value1
Else
Bigger = value2
End If
End Function

Calling the function in the script

Result = Bigger(20,21)
Msgbox Result 'gives 21

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

1016


Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

4932


How you can find the absolute value of the number in qtp?

994


Can we create a qtp test from qc?

1026


How will you report the bug and explain the defect tracking sheet you handled?

3083


how can i pass a "cript"as a parameter in to a function

1980


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

990


In qtp, explain what is crypt object

1029


Can we run multiple QTP scripts one after the other without manual intervention? How?

1051


What is system testing and what are the different types of tests you perform in system testing?

1149


How many types of object repository in qtp?

1096


what is output value in QTP and how it can be used in automation testing

1980


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

25695


What is the virtual object?

1129


Explain the concept of how quicktest professional identifies object?

969