Hi PLZ explain User Defined Functions in QTP with eample?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the difference between QTP 8.2 and QTP 9.2
What is qtp window?
What are table and db checkpoints?
Can we Script any test case with out having Object repository? or Using Object Repository is a must
Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,
Hi,can anyone tell me How to found the number of 1's and 2's in the given format 1,1,2,2,3,3,4,2 using vbscript Thanks in advance
How the exception handling can be done using quicktest professional (qtp)?
what is the use of descripting programming?
What is output value? How many types of output values are there in qtp?
write a qtp code to display all the items in the fly from combo box or list box
How we can differentiate between stand alone application and web application in QTP?
What is Curd testing?