Open topic with navigation
Before the wizard creates the custom support class file, the Custom Static-Text Support Class Summary screen summarizes the specifications you provided for the new support class.
If you want to change any of the data, click Cancel to return to the Custom Static-Text Class Selection Screen.
If you are satisfied with the definitions, click OK. The wizard creates the new support class with the following methods, which are required for the support of static-text objects:
class_attr. Returns the string
static_text, enabling UFT to recognize objects of this class as static-text controls.
label_attr. Returns the label property of the superclass.
When the label property for a Java control is empty, UFT looks for an adjacent static-text control and uses its label property for the test object name. Therefore you may want to implement the label_attr method to return the appropriate name, for example, the string displayed by the static-text control.
tag_attr. Returns the tag property of the superclass (which returns the label property value) with the suffix
(st). This method provides the test object name for the static-text control itself, while the label_attr method provides the name used for adjacent controls.
For example, if you implement the label_attr method to return
MyButton, the tag_attr method returns
For more information, see Common Identification Property Support Methods.
value_attr. Returns the label property.
The value property represents a control's test object state. For static-text controls, the label property adequately represents this state.
You can practice creating support for a custom static-text control in the tutorial lesson Learning to Support a Custom Static-Text Control.
After you finish creating a custom support class for a custom static-text class (using the New UFT Custom Static-Text Support Class Wizard), you need to perform the following additional steps:
Save the class.
In Eclipse, the new class file is opened and displayed in a tab in the right pane. Until you save the class, an asterisk (*) is displayed in the tab next to the support class file name. The changes made by the wizard are codependent and need to be saved to prevent discrepancies.
Implement the label_attr method, if needed.
Deploy the toolkit support to UFT to enable the support to be available. For more information, see Deploying and Running the Custom Toolkit Support.