AIRegex Object
Supported on UFT One versions 2023 and later.
Description
AIRegex is a class that creates an AIRegexObj. The AIRegexObj object contains a regular expression, which provides a text pattern.
Use this object when describing text for AI-based object identification. This enables you to describe the AI-based object using a text pattern the text should match, rather than exact text.
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.
Use AIRegex in the AIText parameter of the AIUtil.AIObject or AIUtil.FindTextBlock properties that create an AIObject.
Operations
The sections below list the built-in methods and properties that you can use as operations for the AIRegex class and the AIRegexObj object.
Properties
![]() | Creates the AIRegexObj Object, which has the Pattern property.
|
![]() | The regular expression represented by this AIRegexObj object. |
CreateRegexObj Property
Description
Creates an AIRegexObj object containing the specified regular expression.
Syntax
This is the default property of the AIRegex class, and can therefore be omitted from the syntax.
One of:
AIRegex.CreateRegexObj (Pattern)
AIRegex (Pattern)
Arguments
Parameter | Description |
---|---|
Pattern |
Required. A String value. For details about using regular expressions in AI-based testing, see the UFT One Help Center. |
Return Type
An AIRegexObj object.
Example
Pattern Property
Description
Returns the regular expression represented by this AIRegexObj object.
Syntax
object.Pattern
Return Type
A String
Example
See also: