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 DESCRIPTIVE programming when it is useful? & when to use this ?
What is the best institute in Ameerpet? If people think Ameerpet is the pride of hyd they need to go to Delhi/Gurgaon/noida you can find the difference.
What are main panes available in qtp test browser?
How many types of Parameters are available in QTP? and Pls Explain with example.
tell me about if in the interview what i should tell about pharma application,what r the pharma application concepts,i need pharma application testing features
Tel me what was the automation testing process you followed?
suppose u hav a 10 dialog or window opened on screen with same name & value. now how to test each window? i.e. how qtp indetifies these objects separately?
what testplan contents and what test strategy contents,what is the diff b/w them
Give the syntax to import/export xls into qtp.
What are the details steps to connect a remote mysql database in QTP
What all challenges you have faced during automation and how you have resolved it?
When I parameterize a script then for each iteration script is executed from begining to end. If I want to execute some middle steps multiple times using Parameterization (avoiding begining and end steps), what is the solution of this (e.g. total steps are 1 2 3 4 5 and i want 2 3 4 only(not 1 nd 5)