Tutorial: Learning to Create Java Custom Toolkit Support > Learning to Support a Custom Static-Text Control > Deploying and Testing the New Custom Static-Text Support Class

Deploying and Testing the New Custom Static-Text Support Class

In this section, you use the UFT Deploy Toolkit Support command in Eclipse to deploy the ImageControls toolkit support to UFT. This adds the ImageLabel support to UFT, in addition to the ImageButton control whose support you deployed previously. The ImageLabel support is not yet complete, but you can already test the support created up to this point.

  1. Deploy the ImageControls toolkit support to UFT.

    In the Eclipse Package Explorer tab, select the ImageControlsSupport project.

    Click the Deploy Toolkit Support button, or select UFT > Deploy Toolkit Support. In the confirmation messages that open, click Yes and then OK.

    The toolkit configuration file and the test object configuration file are copied to the relevant folders in your UFT installation folder. The custom support will be available the next time you start the custom application. (The test object configuration file was not modified. Therefore, it is not necessary to reopen UFT.)

    For more information on deploying custom toolkit support, see Deploying and Running the Custom Toolkit Support.

  2. Test the new custom support.

    Run the application and view the ImageLabel control and text box with the UFT Object Spy, as described in Planning Support for the ImageLabel Control.

    Note: UFT establishes its connection with an application when the application opens. Therefore, although you can use an open UFT session (running with the ImageControls toolkit support loaded) to test the changes, you must close the SampleApp application, and run it again.

    UFT recognizes the ImageLabel as a JavaStaticText object named ImageLabel(st).

    CanvasCS, which ImageLabelCS extends, does not provide support for the label identification property. Therefore, ImageLabel's label property is empty (as is its attached text property). As a result, the superclass tag property returns ImageLabel's class name, and ImageLabel's tag property is ImageLabel(st).

    UFT still identifies the text box as a JavaEdit test object named TextField (its class name) because the label property of the adjacent static-text object, ImageLabel, is still empty.