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 / arun
Its used for "overriding" an existing Method [ex: click).
You can define your own method also.
If you want to try it do the following simple example.
Goto function library and save the below code.
Public Function func
Dialog("Login").WinButton("OK").Click 'for what
operation
End Function
RegisterUserFunc "WinButton", "myfunc", "func"
Now you have registered this function with the object
winbutton.
now associate this function lib to a new test
so the test should have code like this....
SystemUtil.Run "C:\Program Files\HP\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "arun"
Dialog("Login").WinEdit
("Password:").SetSecure "4c9adb5be66f637242d3941587f3a0762c6
e5350"
Dialog("Login").WinButton("OK").myfunc
Window("Flight Reservation").Close
now run the test u see the difference and the use of
register user func
Note: To run this test, you should have all the objects
saved in your object repository
Regards
praveen and arun
Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
How to use checkpoints in qtp ?
How can you pass value one action to another action?
How does you test a weblink which is changing dynamically?
What are the different types of recovery operation?
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
Should have experience in framework means?
what is the difference between IE & Netscape in web testing on a log in page
UFT 12.02 which ALM version will support
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?
Define Error Pane of UFT?
What is the syntax to call one script from another?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
How to find the difference between 2 dates in qtp?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
What are the different types of functions available in qtp and explain ?