What is the use of "Registeruserfunc" when should we use
it?
Note:Please do not copy paste the date from QTP help.
I tryed it.But I don't Understand where should we use
exactly.
Answer Posted / rajeev
We are using this method to register an user defined function to QTP so that tool will display the registered user defined function in the drop down list directly like when we are using the inbuilt functions.
For example if we are preparing the script by using cint,cdbl,time,date functions etc... these functions are visible in drop down list .
RegisterUserFunc:- We are using this method to register the user defined function for particular class in QTP.
Syntax:- RegisterUserFunc,"ClassName","Function Name","Method Name",True
Example:-
Public function ButtonEnabled(Obj)
var= Obj.GetRoProperty("Enabled")
If var="True" Then
msgbox "Pass"
else
Msgbox"fail"
End If
End Function
Navigation:- Prepare the user defined function > like above in QTP > Copy the function and paste it in notepad > save as .vbs file > associate the .vbs file to the QTP > Prepare the test script like below
Dialog("Login").WinEdit("Agent Name:").Set "rajeev"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").ButtonEnabled("cancle")
Dialog("Login").WinButton("OK").ButtonEnabled("OK")
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
explain how to write vb script in qtp?when will you write own script?
After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.
How can i check items sorted or not in a weblist ? Give me the script for this...
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
Explain xml checkpoints.
Explain about business process component? types and usage?
hi nani my doubt is how does qtp process metrix related to software process.
What is Port testing. Whhen will you perform?
How does quicktest professional identifies the object in the application?
What is an optional step in qtp ?
What is meant by a Check Point in UFT? Also, explain the applicable Check Points.
Explain quicktest professional testing process?
Explain how you can replace string in qtp?
explain keyword driven framework with banking domain?
Can we create a qtp test from qc?