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

whow much strong on VB and C?

1871


How to use parameterization in qtp?

1020


What is throw object?

2270


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

940


Is it possible to switch between recording modes during a test creation?

981


any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in

3832


write script for bitmap image?

1979


what the difference between shared repository and per action repository?

990


How many add-ins comes by default with quicktest professional (qtp)?

945


Why script error occur in between recording in qtp?

2217


How many add-ins comes by default with quicktest professional?

890


How the exception handling can be done using quicktest professional?

950


How QTP support all types of applications (platforms)?

4462


How to find operating system information using the qtp script?

1011


There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code

1649