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 reusable action?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
How to capture a window in QTP?
How to release all resources file from the QTP?
What is meant by Output Value in UFT?
With what extension you can save the list of tests in a file to run in test batch runner?
Explain process of smart Identification in QTP?
how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?
What are the different recording modes and how do they work?
What is object repository in qtp?
Can anybody post some real time scenario in qtp? please its very urgent.
Explain about the test fusion report of quicktest professional?
What is the descriptive programming?
I am having major problems with some DB Table Checkpoints I add to my script. I 35 web based applications recorded and each has DB Table Checkpoints insert but only 1 script isn't recognizing the DB Table Checkpoints for some reason. I've checked the DB connections and the info in the Library Functions and still only this one script out of 35 doesn't recognize the DB Table Checkpoints. Can someone please help me figure out why only this one script out of 35 that's hitting the same database is having a problem.
Explain how you can replace string in qtp?