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 |
In QTP what is the difference between Step-in, Step-out, Step-over ?
Please guide me release notes of Automation once scripts are completed
write a test script in QTP to test the text that written in an image(i.e jpg)of a web page???
I've some problem in Descriptive programming plz help me. I've written in a click event code in Functional library when I run this flight reservation program It is not run. How to I write multiple click event in functional library. My program is this. I have associate an action with functional library. Public Function ClickButton(byval ApplicationName, byval WindowName, byval ObjectName, byref Comments) If Dialog("text:=" &WindowName).WinButton("text:=" &ObjectName).Exist Then Dialog("text:=" &WindowName).Activate Dialog("text:=" &WindowName).WinButton("text:=" &ObjectName).Click Elseif Window("text:="&ApplicationName).WinButton("text:=" &ObjectName).Exist Then Window("text:=" &ApplicationName).Activate Window("text:=" &ApplicationName).WinButton("text:=" &ObjectName).Click End if End Function
how do u plan test automation?
what type of framework u r using in ur organization
What is the differences between image check point and bit map check point?
wt is automation framework? give explonation?
WHat is Object Identification and Object Spy?
Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri
can we enable smart identification for test object
In QTP while testing 3 tier application, It is Java Based Application developed using Java, servelets and JDBC etc... and It is a Web based Application.. which Add-In do we need to select while testing ...Java or Web Add-In