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
What is active screen?
What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?
What are the key elements available in test result window?
The hybrid framework can be implemented for any application. Is it true?
tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
How to give a call to another action from one action?
How do you capture tooltip using QTP?
Is it possible to split an action? How?
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
What are the views available in quicktest professional?
Have you used xml check point in your project? How?
In qtp is it possible to check broken links of a page?
UFT 12.02 which ALM version will support
Explain sub procedure of vbscript.