Text checkpoint/output value steps for Java objects

When working with tests, you can use checkpoints or output values to check that text in your Java application or applet displays correctly. Similar to many other supported environments, we recommend retrieving and checking text from your Java applet or application by inserting a standard checkpoint or output value for the object containing the desired text, and selecting to check or output its text (or similar) (for example, text, attached text, or label).

If the object you want to work with does not have an appropriate , or, if for any other reason, the above recommendation does not answer your needs (for example, the text before or after the selected text is important), consider inserting a UFT text checkpoint or text output value step for a Java object if it meets the following criteria:

  • The object must draw the text itself (and not delegate the drawing task to the underlying operating system, as is the case with most AWT business components).

  • The object must draw text by overriding the paint() method and calling the standard graphics.drawString() method to draw text. For example, the object cannot use special drawing methods for writing text, such as using a method that can draw oval circles to draw the letter O.

  • The object cannot use the double (image) buffering drawing technique.

    Because many Java objects do not answer these criteria, the text checkpoint and text output mechanism for Java objects is disabled by default. You can enable it in the Advanced Java Options Dialog Box.