Registering a method to all classes

In some cases, we may need to customize a method that is common to all TO classes, or at least to all references to a particular environment, such as the Web or Java. For example, suppose we need to customize the Click method and register all Web TO classes. To write a statement for each class is quite tedious, and it may be an error-prone practice. For example:

RegisterUserFunc "WebEdit", "Click", "AQTP_Click"
RegisterUserFunc "WebButton", "Click", "AQTP_Click"
RegisterUserFunc "WebRadiobutton", "Click", "AQTP_Click"

If the new implemented method needs to be registered to all classes of all environments, then it becomes impractical and undesirable to maintain this via code. We can manage such custom function ...

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.