Open topic with navigation
The Custom Class Selection screen is the first screen in the New UFT Custom Support Class wizard. In this screen, you select the custom class you want to support and set the relevant options. The wizard automatically determines which existing support class the new support class must extend, based on the custom class inheritance hierarchy.
When you click Next, the Test Object Class Selection Screen opens.
Note: Selecting the class to support is fundamental to creating a custom support class. If you make changes in later screens and then return to this screen and select a different class, those changes will be discarded.
The main area of this screen contains the following options:
Custom toolkit tree. Displays all of the classes in the custom toolkit that are candidates for support (taken from the custom toolkit class locations you listed in the New UFT Java Add-in Extensibility Project wizard). Use the expand (+) and collapse (-) signs to expand and collapse the tree, and to view its packages and classes.
Only classes that fulfill the following conditions are displayed:
Classes that extend java.awt.Component or org.eclipse.swt.widgets.Widget.
Classes for which UFT support has not yet been extended. If support for a custom class was previously deployed to UFT, or if support for a custom class is being developed in the current Eclipse project, the custom class does not appear in this tree.
Note: If you think a certain class meets all of the requirements above, but it still does not appear in the tree, try to update your environment by using the Reload Support Configuration command.
For example, if you delete custom support in an Eclipse Java Add-in Extensibility project to create new support for the same custom control, you must reload the support configuration. This enables the custom class to appear in the Custom toolkit tree.
Custom class inheritance hierarchy. Displays the inheritance hierarchy of the class selected in the Custom toolkit tree. Gray nodes indicate classes that are not included in this toolkit. Black nodes indicate classes that are part of the custom toolkit.
You can select the custom class you want to extend in the Custom toolkit tree or the Custom class inheritance hierarchy. (In the Custom class inheritance hierarchy you can select only black nodes, and only classes that do not have UFT support.)
Base support class. The support class that the new support class must extend. You cannot modify this information. The wizard selects the support class of the closest ancestor in the hierarchy that has UFT support. (If support for a custom class was previously deployed to UFT, or if support for a custom class is being developed in the current Eclipse project, the wizard recognizes the custom class as having UFT support.)
When UFT recognizes a Java object that is not mapped to a specific support class, it uses the support class mapped to the object's closest ancestor. Therefore, the base support class is the class that would provide support for the custom control if it were not mapped to a specific support class. In the new custom support class, you need to implement (or override) only the support that the base support class does not adequately provide.
You can use the information displayed in the Custom class inheritance hierarchy and Base support class to help you decide whether you should first extend support for another custom class, higher in the hierarchy. Before you decide, consider the following:
Is there a custom class higher in hierarchy that does not have UFT support?
If so, does the custom class have elements that need to be supported in a similar manner for more than one of its descendants?
If you answered "yes" to the above, consider creating support for the higher class first. This will enable its support class to be used as the Base support class. If the class is displayed as a black node in the hierarchy, you can select it in this screen and create support for it in this session of the wizard. If the class appears as a gray node, it is not part of this toolkit, and you cannot create support for it within the current UFT Java Add-in Extensibility project.
If the higher class extends the base toolkit of the current support project, you can add it to the scope of this project by adding it to the custom toolkit. For information on base toolkits, see Custom Toolkit Details Screen. For information on adding a custom class to an existing support project, see Modifying UFT Java Add-in Extensibility Project Properties.
The bottom of the Custom Class Selection screen contains the following options:
Controls of this class represent top-level objects. Enables you to specify that UFT may be expected to recognize the control as the highest Java object in the test object hierarchy. For more information see, Supporting Top-Level Objects.
If you select this check box, the wizard implements the isWindow method in the new custom support class. This method returns true.
This option is available only if the class you selected to support is a container class, meaning that it extends java.awt.container or org.eclipse.swt.widgets.Composite. The check box is selected by default if the new support class extends one of the following support classes: ShellCS (SWT), WindowCS (AWT), AppletCS (AWT).
Change custom support class name. Enables you to modify the default name the wizard provided for the support class, if needed.
By default, the name for a support class is <custom class name>CS. In most cases, there is no need to change the default name. However, if your custom toolkit contains classes from different packages, you might have more than one custom class with the same name. In this case, you must provide different names for the custom support classes because they are stored in one package.
To modify the custom support class name, select the Change custom support class name check box and then enter the new name.
Create support for the higher class in another UFT Java Add-in Extensibility project.
Deploy the support to UFT.
Reopen the original UFT Java Add-in Extensibility project. Select UFT > Reload Support Configuration or click the Reload Support Configuration button.