Eggplant Functional Text Preferences

These settings define the text platforms that are available for use in text property lists. Each platform includes a Text Engine, and any number of predefined text styles. Click Advanced Platform Options to select the languages you want made available to Eggplant Functional for use in OCR searches.

On this page:

Text Preferences panel in Eggplant Functional

Platform

Platform: This drop-down menu contains the names of all of the platforms for which you can currently create text property lists. To display and edit the properties of a platform, choose it in the Platform drop-down menu.

  • Add a Platform: To define a new platform, click Add. The new platform is created with the same initial settings as the platform that was displayed when you clicked Add.
  • Remove a Platform: To remove a platform from Text preferences, choose it in the Platform drop-down menu and click Remove. You cannot remove the default platform unless you name a different default first. Platform removal requires confirmation, and it cannot by undone.

Default Text Platform: The default platform is the initial value of the CurrentTextPlatform global property in your scripts. To set a platform as the default, choose it in the Platform drop-down menu and select the Default checkbox. The default platform name is displayed in bold text.

Text Styles

Each selection in this drop-down menu contains all of the defined text styles for the current platform. Each style includes a defined font, size, text color, and background color. The style might include bold, italic, or underlined text.

Note: Typically, a text style corresponds to a particular type of graphical interface element, such as menu item or title bar.

To display and edit a text style, choose it in the Text Styles drop-down menu. For more information about using styles, see The Find Text Panel.

Text Styles: This drop-down menu lists any text styles you have defined for your searches. Use the following buttons to add or remove a text style:

  • Add: To define a new text style, click the Add button. The new text style is created with the same initial settings as the text style that was displayed when you clicked Add. You can save time by choosing a text style that has some attributes in common with the new text style.
  • Remove: To remove a text style from the current platform, choose the text style in the Text Styles drop-down menu and click Remove. This action cannot be undone.

The following parameters show you the current values for the selected text style:

DPI: By default, OCR uses 72 DPI screen resolution for searches. If the resolution on your SUT is significantly different, you might need to adjust the DPI for the search.

Valid Words: This parameter limits the words that the OCR engine recognizes. By default, the engine uses the entire set of words for the language (or languages) in the current text platform. You can use the asterisk as a wildcard so that the OCR engine looks only for the words in your original text string.

Valid Characters: This parameter limits the characters that the OCR engine recognizes. By default, the engine uses the entire set of characters available for the language (or languages) in the current text platform. You can use the asterisk as a wildcard so that the OCR engine looks only for the characters in your original text string.

Valid Pattern: This property is a string that takes a regular expression value and returns only characters or words that match the specified pattern.

Contrast: Select this checkbox if you want OCR to treat the ReadText() rectangle as a flat, two-color image. This option can be useful when working with anti-aliased text. It filters the screen of the SUT so that it appears two-toned to the OCR engine. Contrast relies on the following settings: 

  • Contrast Tolerance: A measure of how much a pixel can differ from the RGB value of the selected color and still be considered the primary color.
  • Color: Click the color well and select a new color using the Colors panel. OCR treats this color as the primary color of the ReadText() rectangle. It is generally advised to select the background color for this selection.
    Tip: Use the color picker in the Colors panel to copy a color from any place in your display, including the Viewer window. Click the magnifying glass in the Colors panel, then click again wherever you see the color you would like to copy.

Enhance Local Contrast: Select this checkbox if you want OCR to automatically increase the local contrast of the image.

Enable Aggressive Text Extraction: Select this checkbox if you want OCR to extract as much text from the image as possible.

Case Sensitive: Select this checkbox to enable case-sensitive searching.

Ignore Spaces: Select this checkbox to have OCR searches ignore spaces between characters during a search.

Ignore Lines: Select this checkbox to have OCR searches ignore new lines during a search.

Language: Use this drop-down menu to add or remove OCR recognition languages. You can select multiple languages for use in OCR searches. To enable additional languages, navigate to Eggplant > Preferences, then click Text and scroll to Enabled Languages.

Language: Use this drop-down menu to add or remove OCR recognition languages. You can enable languages using the Enabled Languages configuration area.

Advanced Platform Options

Only adjust the following settings if you need to meet special needs in your test environment.

Text Engine

In the Text Engine drop-down menu, you can choose whether you want to search for your text with OCR (optical character recognition) or a text-image generator specific to your SUT. The choices are listed in the table below:

Engine

Operating System

Additional Details

OCR Search (Default)

Any operating system

Native TIG

Mac

Currently included in Eggplant Functional on Mac only.

External TIG

Windows

Host: The host name or IP address of the computer that is hosting your TIG. (To use a TIG on the current SUT, type Current SUT.)

Port: The port on which the TIG host communicates. (The default port is 5899.)

Scripted TIG

Custom

Command: The name of the TIG script.

Enable Logging of OCR Text Found

Selecting this checkbox lets you review the text that the OCR search engine reads during an OCR search.

Enabled Languages

Select the checkbox next to languages you want made available to Eggplant Functional for use in searches.

Restore Defaults

Click this button to restore the Text Preferences to their default settings.

Sharing Text Platforms with Other Users

All of the text platform information you define in Text preferences is stored in a property list within your user account.

Mac and Linux: ~/Library/Eggplant/TextPlatform.plist

Windows: \Library\Eggplant\TextPlatform.plist

To share platform definitions with another user account, copy this file into that account’s Library\Eggplant folder. (This folder is not created until the user changes a text preference.)

 

This topic was last updated on June 21, 2019, at 02:49:49 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant