OCR

AI.AIRunSettings. OCR

OCR settings to use in the current test run. By default, AI settings are used and only English text is identified.

Methods

(static) get() → {Promise.<number>}

Retrieves the OCR settings type being used in the current test run.

Returns:

the OCR settings type being used in the current test run.
Type
Promise.<number>

(static) set(settingsopt) → {Promise.<void>}

Specifies the OCR settings to use in the current test run.

Parameters:

NameTypeAttributesDescription
settingsobject <optional>
The OCR settings to use in the current test run.
Properties
NameTypeAttributesDescription
languagesArray.<string> <optional>
The list of languages to identify by AI OCR in the test run. Possible values are listed under AI.AIRunSettings.OCR.AiOcrLanguages. If no valid language is specified, English is used.
ocr_engine number<optional>The type of OCR settings to use for AI-based steps in web tests. Possible values are listed under OCRType. The default value is AI.

Returns:

a promise that is fulfilled after the OCR settings are updated
Type
Promise.<void>

Type Definitions

AiOcrLanguages

The list of supported OCR languages set by AI.AIRunSettings.OCR.set.

Type:

  • Object

Properties:

NameTypeDescription
enstringEnglish
afstringAfrikaans
eustringBasque
castringCatalan
hrstringCroatian
csstringCzech
dastringDanish
nlstringDutch
eostringEsperanto
etstringEstonian
fistringFinnish
frstringFrench
destringGerman
hustringHungarian
isstringIcelandic
itstringItalian
gastringIrish
lastringLatin
lvstringLatvian
ltstringLithuanian
mtstringMaltese
nostringNorwegian
plstringPolish
ptstringPortuguese
rostringRomanian
skstringSlovak
slstringSlovenian
esstringSpanish
svstringSwedish
trstringTurkish
cystringWelsh
arstringArabic
zhsstringSimplified Chinese
zhtstringTraditional Chinese
bgstringBulgarian
mkstringMacedonian
rustringRussian
srstringSerbian
ukstringUkrainian
elstringGreek
hestringHebrew
jastringJapanese
kostringKorean

OCRType

The types of OCR settings set by AI.AIRunSettings.OCR.set.

Type:

  • Object

Properties:

NameTypeDescription
AInumberAI-based steps use the AI OCR engine and the OCR languages you configured in the AI settings. This is the default setting.
FTnumberAI-based steps use the same OCR engine and languages used for text recognition in property-based steps. Currently, the OCR engine used is ABBYY.