AIOptions Object
Supported in UFT One versions 15.0 and later.
Description
Represents the GUI Testing tab > AI pane of the Options dialog box, which enables you to activate and customize the AI-testing capabilities in UFT One.
For more details about these options, see the UFT One Help Center.
Remarks
You can click the Generate Script button in the General pane of the GUI Testing tab in the Options dialog box to automatically generate an automation script containing the current global testing options, including those represented by the AIOptions object.
Public Properties
In the table below, public properties are marked as follows:
15.0.2+: supported in UFT One versions 15.0.2 and later
2021+: supported in UFT One versions 2021 and later
2022+: supported in UFT One versions 2022 and later
| Indicates where the AI service is installed. |
![]() | Indicates whether to enable AI-based testing capabilities in UFT One. |
| The direction in which to scroll. |
| The maximum number of pages or screens to scroll within a single AI identification. |
| Indicates whether to use automatic scrolling when performing AI-based object identification. |
Indicates whether to verify AI identification before performing the operation. | |
Specifies the environment on which to verify AI identification before performing the operation. | |
Indicates whether to enable the cache mechanism for AI-based object identification. | |
| Specifies the languages to use for AI-based text recognition. A comma-separated list of the ISO 639-1 language codes. |
| Indicates whether to use the UFT One text recognition settings or the default AI OCR engine, and the languages defined in the OCRLanguages property. |
Indicates whether to use proxy authentication when connecting to a remote AI service. | |
The proxy password to use when connecting to a remote AI service. | |
| The proxy type to use when connecting to a remote AI service. |
The proxy username to use when connecting to a remote AI service. | |
| The address of the proxy server to use when connecting to a remote AI service. |
Indicates whether the SSL certificate should be verified when connecting to a remote AI service. | |
| The address to use when connecting to a remote AI service. |
AIServiceType Property
Supported in UFT One version 2022 and later.
Description
Indicates where the AI service is installed.
Syntax
Public Property AIServiceType As String
Return Type
String.
Possible Values
LOCAL, REMOTE
IMPORTANT
When you configure remote AI service connection settings using AOM methods in your test script, the App.Options.AI.AIServiceType = "REMOTE"
statement must come last, for example:
App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE"

Dim App 'As Application ' Declare the Application object variable
Set App = CreateObject("QuickTest.Application") ' Create the Application object
App.Launch ' Start UFT One
App.Visible = True ' Make the UFT One application visible
If Not App.Options.AI.Active Then ' If the AI capabilities are currently not activated
App.Options.AI.Active = True ' Set the option to activate the AI capabilities next time UFT One starts
App.Quit' Close UFT One
Set App = CreateObject("QuickTest.Application") ' Create the Application object
App.Launch ' Start UFT One again
End If
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
Active Property
Description
Indicates whether to enable AI-based testing capabilities in UFT One.
Syntax
Public Property Active As Boolean
Return Type
Boolean
Default:
UFT One version 15.0-15.0.1: false.
UFT One versions 15.0.2 and later: true.
Remarks
After modifying this option, you must restart UFT One for the changes to take effect. Add a statement to your automation script to restart UFT One after modifying this option. See the example below for details.

If not App.Options.AI.Active Then ' If the AI capabilities are currently not activated
App.Options.AI.Active = True ' Set the option to activate the AI capabilities next time UFT One starts
App.Quit' Close UFT One
Set App = CreateObject("QuickTest.Application") ' Create the Application object
App.Launch ' Start UFT One again
End If
AutoScrollDirection Property
Supported in UFT One versions 15.0.2 and later.
Description
The direction in which to scroll.
Syntax
Public Property AutoScrollDirection As String
Return Type
String
Possible Values
Up, Down (default), Right, Left (not case-sensitive)
Remarks
Relevant if EnableAutoScroll=true.
AutoScrollMaxScrolls Property
Supported in UFT One versions 15.0.2 and later.
Description
The maximum number of pages or screens to scroll within a single AI identification.
Syntax
Public Property AutoScrollMaxScrolls As Number
Return Type
Number
Default: 2
Remarks
Relevant if EnableAutoScroll=true.
EnableAutoScroll Property
Supported in UFT One versions 15.0.2 and later.
Description
Indicates whether to use automatic scrolling when performing AI-based object identification.
Syntax
Public Property EnableAutoScroll As Boolean
Return Type
Boolean
Default: true
EnableVerifyIdentification Property
Supported in UFT One versions 2021 and later.
Description
Indicates whether to verify AI identification before performing the operation.
Syntax
Public Property EnableVerifyIdentification As Boolean
Return Type
Boolean
Default: true
EnvsForVerifyIdentification Property
Supported in UFT One versions 2021 and later.
Description
Specifies the environment on which to verify AI identification before performing the operation.
Syntax
Public Property EnvsForVerifyIdentification As String
Return Type
String
Possible Values
"Mobile", "NonMobile", "NonMobile,Mobile"
IdentificationCacheEnabled Property
Supported in UFT One versions 2021 and later.
Description
Indicates whether to enable the cache mechanism for AI-based object identification.
Syntax
Public Property IdentificationCacheEnabled As Boolean
Return Type
Boolean
Default: true
OCRLanguages Property
Supported in UFT One versions 15.0.2 and later.
Description
Specifies the languages to use for AI-based text recognition. A comma-separated list of the ISO 639-1 language codes.
Supported languages: English (en), French (fr), German (de), Italian (it), Japanese (ja), Russian (ru), Simplified Chinese (zhs), Spanish (es).
Syntax
Public Property OCRLanguages As String
Return Type
Default: "en"
Relevant if OCRProvider="AI".
OCRProvider Property
Supported in UFT One versions 15.0.2 and later.
Description
Indicates whether to use the UFT One text recognition settings or the default AI OCR engine, and the languages defined in the OCRLanguages property.
Syntax
Public Property OCRProvider As String
Return Type
String
Possible Values
UFT, AI (default).
RemoteAIServiceProxyAuthentication Property
Supported in UFT One version 2022 and later.
Description
Indicates whether to use proxy authentication when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceProxyAuthentication As Boolean
Return Type
Boolean
Relevant if RemoteAIServiceProxyType="HTTP Proxy".

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceProxyPassword Property
Supported in UFT One version 2022 and later.
Description
The proxy password to use when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceProxyPassword As String
Return Type
String
Relevant if RemoteAIServiceProxyType="HTTP Proxy".

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceProxyType Property
Supported in UFT One version 2022 and later.
Description
The proxy type to use when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceProxyType As String
Return Type
String
Possible Values
HTTP Proxy, System Proxy, None

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceProxyUsername Property
Supported in UFT One version 2022 and later.
Description
The proxy username to use when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceProxyUsername As String
Return Type
String
Relevant if RemoteAIServiceProxyType="HTTP Proxy".

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceProxyURL Property
Supported in UFT One version 2022 and later.
Description
The address of the proxy server to use when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceProxyURL As String
Return Type
String

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceSkipSSLVerification Property
Supported in UFT One version 2022 and later.
Description
Indicates whether the SSL certificate should be verified when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceSkipSSLVerification As Boolean
Return Type
Boolean

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
RemoteAIServiceURL Property
Supported in UFT One version 2022 and later.
Description
The address to use when connecting to a remote AI service.
Syntax
Public Property RemoteAIServiceURL As String
Return Type
String

App.Options.AI.RemoteAIServiceURL = "xxx" 'Set the URL to connect to the remote AI service
App.Options.AI.RemoteAIServieProxyType = "HTTP Proxy" 'Set the proxy type
App.Options.AI.RemoteAIServiceProxyURL = "xxxx" 'Set the proxy URL
App.Options.AI.RemoteAIServiceSkipSSLVerification = True 'Skip the SSL verification
App.Options.AI.RemoteAIServiceProxyAuthentication = True 'Use the proxy authentication
App.Options.AI.RemoteAIServiceProxyUsername = "xxx" 'Set the proxy username
App.Options.AI.RemoteAIServiceProxyPassword = "xxx" 'Set the proxy password
App.Options.AI.AIServiceType = "REMOTE" 'Use the remote AI service
See Also
Example