Using method overriding to support object subtypes

In some cases, we may need to implement different versions of the same native method to reflect different subtypes of a particular control class. To achieve this, we can use method overriding with RegisterUserFunc and reroute our test flow dynamically. For example, suppose that Application Under Test (AUT) uses different types of input controls, such as a password (encrypted) field, specially formatted fields for ID, date, and email, or even just for text, as opposed to numeric only data. In such cases, we might wish to use specific code to validate the input data or even (in a very advanced implementation) to generate it randomly.

Let us take, for example, two input fields (WebEdit) having different ...

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.