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 |
How many types of status are there?
How to insert a check point to a image to check enable property in QTP?
what is actually contain test report? can anybody post the test report
HOW CAN QTP AND TEST DIRECTOR CONNECTED TO THE DATABASE AND WHAT R THE OPTIONS?
1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?
hai, i completed my b.tech in 2010 with 62.3%. i having knowledge on manual testing and Qtp. i want Relavent experience in testing.watever may be d salary i dont bother..I just want to gain knowledge. i dont have good communication skills.
can we enable smart identification for test object
Can we write class for vb script in Quick Test Professional?
Explain the views in the QTP GUI?
How to open any application during Scripting?
How to analyzing test results using quicktest professional?
Can someone tel additonal features which has been included under QTP 9.0 which is not there in 8.2 version?