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?

Answers were Sorted based on User's Feedback



Hi PLZ explain User Defined Functions in QTP with eample?..

Answer / 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

Hi PLZ explain User Defined Functions in QTP with eample?..

Answer / narendra

User defined function is a peice of code/program which
intended to perform some specific task.
e.g if i want to create 100 user id's and i can use each id
to create a profile. To avaoid duplication of ID's we can
write a function (.vbs extension) which generate ID's based
on system date and time so all the ID's will unique. After
that we need to add that function into resources tab in QTP
and can call that function using a single line statement
as ...call <functionname>(arguments, if any)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

anyone can explian about types of "Triggere Events" in QTP

1 Answers  


What is the Risk Analysis? Waht types of risk analysis are there?

1 Answers  


how to load the *.vbs (or) test generating script in a new machine?

3 Answers   Ordain Solutions,


Can we do qtp testing without creating objects in Dbject repository? can we do it completely writing code i.e in expert view only. Are there any books for this?

7 Answers   Accenture,


how to select particular value from the combobox in the current page which is entred in the previous page editbox after parameterization?

5 Answers   Ordain Solutions,


can u write Script to do Data Driven Testing throuh Externel & internel XL Sheet

2 Answers   Relq,


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

0 Answers  


difference Between Call Run action and copy of action?

3 Answers   Quest,


What is the difference between Keyword Driven test and Data Driven test?

0 Answers  


When Recovery scenario actually starts while testing the application?

0 Answers   SAP Labs,


What are the most frequent errors you faced while executing your scripts?

1 Answers  


how to click on object? (with out knowing the object details) for ex: in a webpage one link is available.i want to click that link by using one menthod through qtp?

3 Answers   Zensar,


Categories