Understanding Custom Support Classes
In a custom toolkit support set, there is a custom support class for each supported custom class. The custom support class provides the actual interface between the custom class methods and the UFT One capabilities, thus providing the UFT One Java Add-in Extensibility.
A single custom support class can provide support for more than one custom class. The support class can be mapped (in the toolkit configuration file) to more than one custom class. This support class then provides support for the custom classes that are mapped to it, and for their descendants.
The first step in creating the support classes is determining the class inheritance hierarchy. This includes deciding the order in which you create support for classes within the custom toolkit, and determining which existing support class the new support class must extend.
The second step is deciding what test object class to map to the custom control.
After you make the preliminary decisions regarding hierarchy and test object class, you are ready to write the main part of the UFT One Java Add-in Extensibility—the custom support class.
Each custom support class determines what test object class is mapped to the custom control it supports and how the identification properties and test object methods are implemented.
The custom support class inherits the methods of its superclass. You can use the super implementation, override the methods, or add new ones, as needed. In support classes, you use the following types of methods:
Identification property support methods. Used to support identification properties.
Replay methods. Used to support test object methods.
Event handler methods. Used to provide support for recording on the custom control. This part of the Extensibility is optional. Even if you do not implement support for recording, you still have full support for the basic UFT One capabilities on the custom control (for example, learning the object, running tests on it, and checking properties and values).
If the custom class extends SWT, you cannot create support for the UFT One recording capability.
Utility methods. Used to control the Extensibility. These methods do not support the specific functionality of the custom class; they control the interface between UFT One and the custom application. Different utility methods are used for different purposes.
You can find a list of the available utility methods in the Support Class Summary. The methods are described in detail, in the following sections: Supporting the Record Option, Supporting Top-Level Objects, and Supporting Wrapper Controls.
When you implement these methods in the custom support class, you can use different methods supplied in the MicAPI. For more information, see Using Methods from MicAPI and the
For a short summary of the types of methods a custom class contains, see Support Class Summary.