Open topic with navigation
Examine the contents of the new ImageLabelCS.java file. The ImageLabelCS custom static-text support class extends CanvasCS.
In the new support class, the wizard created stubs for the following methods:
class_attr. Returns the string
This informs UFT that the ImageLabel control is a JavaStaticText object. This means that the UFT mechanism that searches for attached text can use the ImageLabel's label property as attached text for adjacent controls.
label_attr. Returns the label property of the superclass (in this case CanvasCS).
This method defines ImageLabel's label identification property. The text in this identification property is used for adjacent controls' attached text. The wizard includes a comment in this method stub, reminding you to implement it to return the appropriate text.
tag_attr. This method supports the tag property, which represents the name of the static-text test object.
In the lesson Learning to Support a Simple Control, in the section Changing the Name of the Test Object, you learned how the tag property is implemented. The tag_attr method in the support class that the wizard creates returns
super.tag_attr(obj) with the added suffix
(st). This means that the name for the static-text test object is derived by using the same logic as for regular test objects (label, attached text or unqualified class name), and adding
(st) at the end.
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.
For more information on these special identification properties, see Common Identification Property Support Methods.