AIRunSettings Object

Supported in UFT One versions 15.0.2 and later.


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.


AI objects are supported in UFT One only when:

  • The UFT One Web Add-in or Mobile Add-in are 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.


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

Property AutoScroll

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



Property OCR

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



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.



Possible values: micExactMatch, micAIMatch


  • 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.
  • Exact match is case-insensitive.

Back to top

AIRunSettingsAutoScroll Object


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.


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


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

Method Enable

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


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


  • 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 Disable

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



Back to top

AIRunSettingsOCR Object


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

By default, only English text is identified.


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


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

Property Languages

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



Possible values:

de - German

en - English

es - Spanish

fr - French

ja - Japanese

it - Italian

ru - Russian

zhs - Simplified Chinese

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

Back to top