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
what is error and fault in terms of software quality?
What are the views available in qtp?
Hi ,Can any one pleas explain how to test splash objects using QTP?
am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)
How to find the path of folder in which the test is saved in qtp?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
Why do we use breakpoints in QTP?
after initiating one project for testing, when exacltly QTP tester role starts?
In qtp, how you can get the last character from a string?
What are the different types of recovery operation?
On what document base Descriptive programming is written if build is not yet ready ?
can u explain relative path architecture framework in qtp?
how to evalute defects in QTP script?
What is the extension of the recovery scenario file in qtp?
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...