Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is error and fault in terms of software quality?

1846


What are the views available in qtp?

981


Hi ,Can any one pleas explain how to test splash objects using QTP?

2312


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)

1675


How to find the path of folder in which the test is saved in qtp?

942


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

1825


Why do we use breakpoints in QTP?

994


after initiating one project for testing, when exacltly QTP tester role starts?

1849


In qtp, how you can get the last character from a string?

948


What are the different types of recovery operation?

958


On what document base Descriptive programming is written if build is not yet ready ?

1349


can u explain relative path architecture framework in qtp?

1943


how to evalute defects in QTP script?

1936


What is the extension of the recovery scenario file in qtp?

939


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...

1983