Open topic with navigation
In this section, you analyze the current UFT support of the ImageLabel control and the adjacent text box, determine how you want UFT to recognize the controls, and fill in the Custom Class Support Planning Checklist, accordingly.
Open UFT and load the Java Add-in and the custom toolkit support.
Open UFT. The Add-in Manager dialog box displays ImageControls (for which you created support in the previous lesson) as a child of the Java Add-in in the list of available add-ins. (If the Add-in Manager dialog box does not open, see the Micro Focus Unified Functional Testing Add-ins Guide for instructions.)
Make sure that the check boxes for both Java and ImageControls are selected, and click OK.
Run the SampleApp application.
In the Eclipse Package Explorer tab, right-click SampleApp. Select Run As > Java Application. The SampleApp application opens:
Use the Object Spy to view the ImageLabel properties.
In UFT, open a GUI test and select Tools > Object Spy or click the Object Spy toolbar button to open the Object Spy dialog box. Click the Properties tab.
In the Object Spy dialog box, click the pointing hand , then click the image on the left in the SampleApp application.
The ImageLabel control is based on a custom class that UFT does not recognize. Therefore, it recognizes the button as a generic JavaObject object named ImageLabel, and the icon shown is the standard JavaObject class icon. The label identification property is empty:
Use the Object Spy to view the text box properties.
In the Object Spy dialog box, click the pointing hand , then click the text box in the SampleApp application.
The text box is based on a standard TextField class; therefore UFT recognizes it as a JavaEdit test object. However, the label identification property is empty and UFT does not recognize any adjacent controls as static-text controls. Therefore, the JavaEdit test object is named according to its class name—TextField:
Close the Object Spy.
Complete the custom class support planning checklist.
The ImageLabel control is a static-text control. You want UFT to recognize this fact, and use the ImageLabel's label property as attached text for adjacent controls that do not have their own label property.
The ImageLabel displays an image file optionally accompanied by additional text. When the control does not display any text, the name of the test object that represents the control can be based on the name of the image file that the control displays.
The ImageLabel itself does not have any additional identification properties or test object methods that need to be identified in UFTGUI tests. In addition, there is no need to record any operations on the ImageLabel control.