Sunday, 10 March 2013

What is registeruserfunc in QTP

What is registeruserfunc?

You can use the RegisterUserFunc statement to instruct QuickTest to use your user-defined function as a method of a specified test object class for the duration of a test run, or until you unregister the method. RegisterUserFunc in QTP can be used for both Method Overriding as well as Method Reuse. 

In method overriding, we can override the default implementation of the function and replace with a new custom implementation. For example, we can create a function, say fnClick, which will not only click on an element, but it also first verify if the element we want to click exists and is enabled. In method reuse, we can create a function which we can bind with multiple controls & then use this function for all these controls. For example, we can create a function fnClick, which can be used to click on a button, on a link on an image and so on.

Refer below link for more details - http://www.automationrepository.com/2011/12/how-to-achieve-method-overriding-and-reuse-using-registeruserfunc-in-qtp/

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.