Configure text recognition settings

Relevant for: GUI tests and components


In your application, display the text you want to capture.

Back to top

Analyze the characteristics of the text

Determine whether you can capture the text using a text (or text-like) property instead of using a text recognition mechanism.

Back to top

Set the appropriate options

In the Text Recognition pane of the Options dialog box (Tools > Options > GUI Testing tab > Text Recognition node, set the following options:

OCR engine type

Select either the Abby OCR or Tesseract OCR text recognition option.

The performance of the Tesseract OCR engine is slower than the Abby OCR engine. If your test has a significant use of text recognition steps (such as GetVisibleText), note that the total time required to run these tests will increase.

Text Recognition mode
  • Single text block mode: Focuses on the area and treat it as a single text block. This is especially useful when trying to capture text on small objects or in a small text area. Select this radio button if the text on the object is uniform in font, size, color, and background. For example:

  • Multiple text block mode: Instructs the OCR mechanism to handle each text area in the object that has a different background font and size. The OCR mechanism decides where to divide the text blocks according to an internal algorithm. Select this radio button only if the text on the object comprises different fonts, font sizes, colors, and/or backgrounds. For example:

Available languages and supported languages

(For the Abby OCR engine only) From the list of selected languages, select the supported languages for text recognition.

You can select multiple non-hieroglypic languages (which include Chinese, Japanese, or Korean), or one of the hieroglyphic languages.

Symbols for text recognition (For the Tesseract OCR engine only) Enter the list of characters you want UFT to recognize. When UFT runs the test, it will perform text recognition only on the characters specified and all others are ignored.
Current language pack

(For the Tesseract OCR engine only). The current language pack to use in text recognition. When using the Tesseract engine, it is possible to use only one language pack at a time.

You can download additional language packs from the Tesseract OCR engine download site: After downloading, add the files from the language packs in the <UFT installation directory>/dat/tessdata folder.

Text recognition mode Select whether you want UFT to perform with greater text recognition accuracy or better test run performance. Clear the Fast mode checkbox to run with greater accuracy.
Use configuration from a file

Instructs UFT load text recognition configuration from an externally created file.

For details on creating a file, see

Preprocess the image before using text recognition Instructs UFT to process the background image before performing text recognition. This enables UFT to identify the image elements before using text recognition.

Back to top

Check the text recognition settings

  1. Create or open a test or component.
  2. Do any of the following:

    • Insert a text checkpoint or output value step (tests and scripted components only)

    • Insert a step that uses one of the following test object methods:

      • testobject.GetVisibleText

      • testobject.GetTextLocation

      • testobject.GetText (for Terminal Emulator objects)

    • Insert a step that uses one of the following reserved object methods (tests and scripted components only):

      • TextUtil.GetText

      • TextUtil.GetTextLocation

  3. Back to top

Adjust the settings as necessary

If the captured text is not as expected, analyze the problems and adjust the Text Recognition options to fine tune the way UFT captures your text.

Back to top