AIRunSettings Object

Description

An object containing the settings for the current test run. These settings enable you to modify test settings during the test run, overriding the global settings defined in Tools > Options > GUI Testing > AI.

IMPORTANT

AI-based testing is supported on the following technologies:

  • UFT One versions 2022 and later: Web, mobile, and SAP GUI for Windows.

  • UFT One versions 2021 R1 and earlier: Web and mobile.

AI objects are supported in UFT One only when:

  • The UFT One Web Add-in, Mobile Add-in, or SAP Solutions Add-in is installed and loaded.
  • The UFT One AI Features are installed and AI is enabled in the UFT One options. For details, see the UFT One Help Center.

To retrieve an AIRunSettings object, use the AIUtil.RunSettings property.

The settings in an AIRunSettings object are arranged in child objects, each for a different type of settings. Use the relevant object property to retrieve the child settings objects.

Properties

The following table lists the built-in properties that you can use to access the settings child objects.

Property AIServiceMode

UFT One 2022 or later

Indicates whether the AI Service is accessed locally or remotely.

Syntax

AIUtil.RunSettings.AIServiceMode

Property AutoScroll

Returns the AIRunSettingsAutoScroll object to use for the current test run.

Syntax

AIUtil.RunSettings.AutoScroll

PropertyComboBoxSelect

UFT One 2023 or later

Returns the AIRunSettingsComboBoxSelect object to use for the current test run.

Syntax

AIUtil.RunSettings.ComboBoxSelect

Property OCR

Returns the AIRunSettingsOCR object to use for the current test run.

Syntax

AIUtil.RunSettings.OCR

Property VerifyIdentification

Returns the AIRunSettingsVerifyIdentification object to use for the current test run.

Syntax

AlUtil.RunSettings.VerifyIdentification

Property TextMatch

A String value. Specifies whether to look for the specified text exactly when identifying AI test objects, or use AI algorithms to find similar text as well.

Back to top

AIServiceMode Property

Supported in UFT One 2022 or later

Description

Indicates whether the AI Service is accessed locally or remotely

.

An Integer or predefined value.

Syntax

AIUtil.RunSettings.AIServiceMode

Possible values

  • 0 or Local_AI. Use the local AI service. (Default)

  • 1 or Remote_AI. Use a remote AI service.

Back to top

AIRunSettingsAutoScroll Object

Description

Controls automatic scrolling for AI identification in the current test run.

By default, the automatic scrolling is on, and set to scroll down, up to 2 times.

Important

To retrieve an AIRunSettingsAutoScroll object, use the AIUtil.RunSettings.AutoScroll property.

Methods

The following table lists the methods you can call to control the run time AutoScroll settings:

Method Disable

Disables automatic scrolling for AI identification in the current test run.

Syntax

AIUtil.RunSettings.AutoScroll.Disable

Method Enable

Enables and configures automatic scrolling for AI identification in the current test run.

Syntax

AIUtil.RunSettings.AutoScroll.Enable scrolldirection, [maxNumberOfScrolls]

Arguments

  • scrolldirection. The direction in which to scroll.

    Possible values: up, down, right, left.

  • maxNumberOfScrolls. Optional. The maximum number of times to scroll in search of the object.

    Tip: If you do not specify a number, or you enter -1, the scroll direction is updated and the maximum number setting remains unchanged.

Method GetDirection

 

 

 

(UFT One versions 2021 R1 and later)

Retrieves the direction used for automatic scrolling.

Syntax

AIUtil.RunSettings.AutoScroll.GetDirection

Possible values:

up, down, right, left.

Method GetMaxNumOfScrolls

 

(UFT One versions 2021 R1 and later)

Retrieves the maximum number of scrolls used for automatic scrolling.

Syntax

AIUtil.RunSettings.AutoScroll.GetMaxNumOfScrolls

Property IsEnabled

 

 

 

 

(UFT One versions 2021 R1 and later)

Indicates whether automatic scrolling is enabled.

Syntax

AIUtil.RunSettings.AutoScroll.IsEnabled

Possible values:

  • True

  • False

Back to top

AIRunSettingsComboBoxSelect Object

Supported on UFT One versions 2023 and later.

Description

Controls a combo box's AI-based Select operation.

By default, when looking for the item to select in a combo box's list, UFT One is set to scroll down, up to 10 times.

Important

  • To retrieve an AIRunSettingsComboBoxSelect object, use the AIUtil.RunSettings.ComboBoxSelect property.

  • The AI-based Select operation is supported only on non-mobile applications, and is used when the combo box is not identified as a WebList.

Properties

The following table lists the properties that represent the run time ComboBoxSelect settings:

Method MaxScrollNum

 

 

 

An Integer. Specifies the maximum number of times to scroll in the ComboBox's drop-down list.

Default: 10

Method ScrollingDirection

 

 

 

A String. Specifies whether to scroll up or down in the ComboBox's drop-down list.

Possible values: "down", "up".

Default: down

Method TicksPerScroll

Specifies how many mouse-wheel ticks each scroll advances.

Default: 1

Back to top

AIRunSettingsOCR Object

Description

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

By default, only English text is identified.

Important

To retrieve an AIRunSettingsOCR object, use the AIUtil.RunSettings.OCR property.

Properties

The following table lists the properties that represent the run time OCR settings:

Method GetConfigSet

 

 

(UFT One versions 2021 R1 and later)

A number or predefined constant. Indicates which set of OCR settings is used.

Possible values

  • 0 or AI_OCR. Use AI OCR settings.

  • 1 or UFT_OCR. Use UFT OCR settings.

Property Languages

A String. A comma-separated list of the OCR languages to use in the test run.

Syntax

AIUtil.RunSettings.OCR.Languages

Possible values:

en – English

af – Afrikaans

eu – Basque

ca – Catalan

hr – Croatian

cs – Czech

da – Danish

nl – Dutch

eo – Esperanto

et – Estonian

fi – Finnish

fr – French

de – German

hu – Hungarian

is – Icelandic

it – Italian

ga – Irish

la – Latin

lv – Latvian

lt – Lithuanian

mt – Maltese

no – Norwegian

pl – Polish

pt – Portuguese

ro – Romanian

sk – Slovak

sl – Slovenian

es – Spanish

sv – Swedish

tr – Turkish

cy – Welsh

ar – Arabic

zhs – Simplified Chinese

zht – Traditional Chinese

bg – Bulgarian

mk – Macedonian

ru – Russian

sr – Serbian

uk – Ukrainian

el – Greek

he – Hebrew

ja – Japanese

ko – Korean

If any other language is specified, English is used instead.

Method UseConfigSet

 

 

(UFT One versions 2021 R1 and later)

A number or predefined constant. Specifies which set of OCR settings to use.

Possible values: 

  • 0 or AI_OCR. Use AI OCR settings.

  • 1 or UFT_OCR. Use UFT OCR settings.

Back to top

AIRunSettingsVerifyIdentification Object

Description

Controls whether to verify the AI identification before performing the operation in the current test run.

Important

To retrieve an AIRunSettingsVerifyIdentification object, use the AlUtil.RunSettings.VerifyIdentification property.

Methods

The following table lists the methods you can call to control the identification verification settings:

Method Disable

Disables verifying AI identification in the current test run.

Syntax

AIUtil.RunSettings.VerifyIdentification.Disable

Note

This disables identification verification for both Web and Mobile contexts.

Method Enable

Enables verifying AI identification in the current test run.

Syntax

AIUtil.RunSettings.VerifyIdentification.Enable

Note

This enables identification verification for both Web and Mobile contexts.

Property IsEnabled

 

 

 

 

(UFT One versions 2021 R1 and later)

Indicates whether AI identification is verified before performing operations.

Syntax

AIUtil.RunSettings.VerifyIdentification.IsEnabled

Possible values

True - Identification verification is enabled for at least one of the contexts Web or Mobile.

False - Identification verification is disabled for both Web and Mobile.

Back to top

TextMatch Property

Description

Specifies whether to look for the specified text exactly when identifying AI test objects, or use AI algorithms to find similar text as well.

Syntax

AIUtil.RunSettings.TextMatch

Possible values: micExactMatch, micAIMatch

Remarks

  • By default, AI algorithms are used for text matching. If you set this property to micExactMatch in a test run, we recommend limiting it to specific steps and then setting back to micAIMatch.
  • When using regular expression matching with micAIMatch, a certain level of deviation from the specified text pattern is accepted. For example, the pattern "Subtotal \(\d item\): \$[\d.]+" will pick up the price string even if it says "items" in plural or "Subt0tal" with a '0' instead of an 'o'.
  • Exact match is case-insensitive.

Back to top

See also: