Modifying an Existing Test Object Class

Identify a test object class that provides partial support for your control, but needs some modification, for example, additional or modified test object methods.

You can then extend the functionality of this test object by defining and implementing additional test object methods. In addition, you can override existing test object methods by providing an alternate implementation for them. You define the new or changed methods in the test object configuration file, and design their implementation using Custom Servers.

Adding Test Object Methods to an Existing Test Object Class

When you create a test object class definition in the test object configuration file, you specify the custom control for which this definition is relevant. (In the ClassInfo element, you specify the test object class in the BaseClassInfoName attribute, and the name of the custom class in the Name attribute.)

If you then add a custom test object method to the definition of this test object class, this method is available in UFT only for test objects that represent custom controls of the type you specified.

For example, if you added a Set method to the SwfEditor test object class when used for MyCompany.MyButton controls, then the method is displayed in the statement completion list of test object methods in UFT only for objects that represent such controls. When SwfEditor test objects are used for other types of controls, this method will not be available.