AIRegex Object

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:

    Web, mobile, and SAP GUI for Windows.

  • AI objects are supported in only when:

    • The Web Add-in, Mobile Add-in, or SAP Solutions Add-in is installed and loaded.
    • The AI Object Detection feature is installed and enabled in the OpenText Functional Testing options. For details, see the OpenText Functional Testing 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

Property AIRegex.CreateRegexObj

Creates the AIRegexObj Object, which has the Pattern property.

 

Property AIRegexObj.Pattern

The regular expression represented by this AIRegexObj object.

Back to top

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

ParameterDescription
Pattern

Required. A String value.
The regular expression that describes the text to use.

For details about using regular expressions in AI-based testing, see the OpenText Functional Testing Help Center.

Return Type

An AIRegexObj object.

Example

Back to top

 

Pattern Property

Description

Returns the regular expression represented by this AIRegexObj object.

Syntax

object.Pattern 

Return Type

A String

Example

Back to top

See also: