OcrRegion class

Platform: AppiumLanguage: Java SDK:
An object of this type is used to define where OCR text extraction should be done.
You can extract text from an application window using OCR by passing one or more OcrRegion objects to the method Eyes.extractText. Each such object defines a region in the applicaiton window . In addition, you can use the hint method to specify literal text or a regular expression-like pattern that should match the text found. The hint helps overcome ambiguities that arise when using OCR. It can be used, for example, to disinguish between the numeric '0' (zero) character and the alphabetic 'O' character.

For more information see Eyes OCR support .

This feature is experimental. Please note that the functionality and/or API may change.

Import statement

import com.applitools.eyes.locators.OcrRegion;
	

Example

Example not yet available.

Constructor

OcrRegion()
Define a region from which Eyes should extract the image.
OcrRegion()
Define a region from which Eyes should extract the image.

Methods

hint()
Use this optional method to define the expected text as literal text or as a pattern.
hint()
Use this optional method to define the expected text as literal text or as a pattern.
region()
Define a sub-region in the target that should be the area searched using OCR.
region()
Define a sub region in the target that should be the area searched using OCR.