For more on the differences between reading and finding text, see How to Use OCR. The Read tab displays the following properties that can be set when reading text off the screen of the system under test (SUT). Some properties are only available for use when reading text, or for searching text, but not both. This is because OCR can be used to either find a given string of text, or read unknown text off of the SUT screen. The upper-right quadrant of the panel has two tabs: Find, and Read. Text Difference: This property causes text searches to find text that differs from your search by a given number of characters. This property is only available for text searches (not available with ReadText). Ignore Newlines: When enabled, ignoreNewlines causes OCR text searches to ignore line breaks, so a search will match a string even if it's broken over several lines. The ignoreUnderscores property is on by default, because the OCR sometimes fails to recognize underscores. For example, the string "My_Computer" would match "My_Computer" or "My Computer". Ignore Underscores: The ignoreUnderscores property causes OCR text searches to treat underscores as spaces during searches. This is because the OCR sometimes reads spaces that are not intended, especially in strings that are not discrete words, and in text with unusual letter-spacing. The ignoreSpaces property is on by default. For example, the string "My Computer" would match "M圜omputer" or "M y C o m p u t e r". Ignore Spaces: The ignoreSpaces property causes OCR text searches to disregard spaces in your text string. This property is for searching for text, not reading text. Enable this property to force text searches to respect case and only find text that matches your text string’s capitalization exactly. For more on the differences between reading and finding text, see How to Use OCR.Ĭase Sensitive: Whether or not Eggplant Functional considers case in text searches. The Find tab displays the following properties that can be set when searching for a given string of text. The upper-right quadrant of the panel has two tabs: Find and Read.
The Contrast setting converts the image OCR takes of the system under test (SUT) to black and white before sending it to the OCR engine for recognition. The Contrast section allows you to set and work with the Contrast property and related properties. For more on this see Save or Copy Property Settings. This can be used to copy the current text properties as you have them set in the following sections for use in your script. To the right of this section is the copy icon. This option is disabled when the Default style is selected. To delete the current selected style, click Delete Style. To save this new style, select the word "Default" in the Text Style drop-down menu and change the name, or select the style you want to override (the Default style can be modified). Once you modify the OCR Properties in the sections below this one, you have altered the current style. The panel opens with the Default style selected. For more on the difference between reading and searching, see How to Use OCR. Text styles can be applied to both OCR searches and ReadText().
Each text style is typically tailored to a particular font or type of GUI element, such as a menu item or title bar that will be encountered repeatedly in an application under test. Text Properties Panel Overview Text StyleĪ text style is a saved set of text properties as defined in the Eggplant Functional Text Preferences, OCR Tuner, or OCR Update panel.