Open topic with navigation
The UFT Java Add-in provides a certain level of support for every Java control. Before you extend support for a custom Java control, analyze it from a UFT perspective to view the extent of this support and to decide which elements of support you need to modify.
When you analyze the custom control, use the Object Spy, Keyword View, Editor, and the Record option. Make sure you examine each of the elements described in Identifying the Building Blocks of Java Add-in Extensibility.
If you are not satisfied with the existing object identification or behavior, your control is a candidate for Java Add-in Extensibility, as illustrated in the following situations:
UFT might recognize the control using a test object class that does not fit your needs. You can use Java Add-in Extensibility to map the custom class to another existing test object class or to a new test object class that you create.
The test object class mapped to the control might be satisfactory, but you would like to customize the behavior of certain test object methods or identification properties. You can use Java Add-in Extensibility to override the default implementation of these properties and methods with your own custom implementation.
You may find that the test object names UFT generates for all controls of a certain Java class are identical (except for a unique counter) or that the name used for the control does not clearly indicate the object it represents. You can use Java Add-in Extensibility to modify how UFT names test objects for that Java class.
UFT may identify individual sub-controls within your custom control, but not properly identify your main control. For example, if your main custom control is a digital clock with edit boxes containing the hour and minute digits, you might want changes in the time to be recognized as SetTime operations on the clock control and not as Set operations on the edit boxes. You can use Java Add-in Extensibility to treat a custom control as a wrapper object for the controls it contains. UFT does not learn the individual controls contained in a wrapper object.
During a record session, when you perform operations or trigger events on your control, UFT may not record a step at all, or it may record steps that are not specific to the control's behavior. Alternatively, UFT may record many steps for an event that should be considered a single operation, or it may record a step when no step should be recorded. You can use Java Add-in Extensibility to modify the events to listen for and the test steps to record for specific events.
For an example illustrating how to use Java Add-in Extensibility to improve UFT support of a custom control, see Analyzing the Default UFT Support and Extensibility Options for a Sample Custom Control.