OpenText™ Functional Testing for Developers JavaScript SDK

AI. AiObject

new AiObject(propsopt) → {AiObject}

The description of an object identified using Artificial Intelligence.
Parameters:
Name Type Attributes Description
props Object <optional>
Initializes a description of an object identified using Artificial Intelligence. using the supplied property bag.
Returns:
the description object that was initialized.
Type
AiObject

Methods

aiClass(aiClassopt) → {string|Description}

the AI Class type of the AI object list of supported classes can be taken from AI.AiTypes.
Parameters:
Name Type Attributes Description
aiClass string <optional>
When provided, this method acts as a setter and sets the aiClass value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored aiClass value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

locator(locatoropt) → {object|Description}

Used to describe the unique location of an object that may appear multiple times in the application.
Parameters:
Name Type Attributes Description
locator object <optional>
When provided, this method acts as a setter and sets the locator value. Should be either AI.PositionalLocator or AI.RelationalLocator.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored locator value; otherwise it returns 'this' for use with the builder pattern.
Type
object | Description

text(textopt) → {string|object|Description}

The text used to identify the AI Object.
Parameters:
Name Type Attributes Description
text string | object <optional>
When provided as string, this method acts as a setter and sets the text value; when provided as an object like { text: string, matchMethod: AI.MatchMethod }, it sets both the text and match method values.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored text value only or together with the text match value like { text: string, matchMethod: AI.MatchMethod }, otherwise it returns 'this' for use with the builder pattern.
Type
string | object | Description