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
If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..
How you can find the absolute value of the number in qtp?
Can we create a qtp test from qc?
How will you report the bug and explain the defect tracking sheet you handled?
how can i pass a "cript"as a parameter in to a function
How can you identify the browser and its information using the qtp script?
In qtp, explain what is crypt object
Can we run multiple QTP scripts one after the other without manual intervention? How?
What is system testing and what are the different types of tests you perform in system testing?
How many types of object repository in qtp?
what is output value in QTP and how it can be used in automation testing
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
What is the virtual object?
Explain the concept of how quicktest professional identifies object?