Constructor
new AiObjectTO()
Members
displayName
Methods
$(description) → {*}
Parameters:
Name | Type | Description |
---|---|---|
description | Description | The description of the test object. Can be a full test object description or a string. If a string is provided, it is interpreted as a CSS selector with a default test object type of WebElement. |
Returns:
- Type
- *
$$(description, dontFilterByTypeopt) → {Promise.<Array.<TestObject>>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
description | A description object that defines the test object type and the set of properties and values that should be common to all objects that are returned. | |||
dontFilterByType | boolean |
<optional> | false | Set this parameter to true to avoid limiting the returned objects to a specific test object type. |
Returns:
- Type
- Promise.<Array.<TestObject>>
aiClass() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
click(argsopt) → {Promise.<void>}
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args | Object |
<optional> | The arguments for the click operation.
Properties
|
Returns:
- Type
- Promise.<void>
description() → {*}
Returns:
- Type
- *
doubleClick() → {Promise.<void>}
Returns:
- Type
- Promise.<void>
exists(timeoutopt) → {Promise.<boolean>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
timeout | number |
<optional> | The time (in seconds) to wait for this object before returning a result of true or false. By default, uses the object synchronization timeout defined in the runtime engine settings. |
Returns:
- Type
- Promise.<boolean>
getTextLocations(text, rectangleopt) → {Promise.<Object>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
text | string | The text to search for in the test object. | |
rectangle | Object |
<optional> | The rectangular area in the test object to search for the text. |
Returns:
- Type
- Promise.<Object>
getValue() → {Promise.<any>}
Returns:
- Type
- Promise.<any>
getVisibleText(rectangleopt) → {Promise.<string>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
rectangle | Object |
<optional> | The rectangular area in the test object to return the text from. |
Returns:
- Type
- Promise.<string>
highlight() → {Promise.<void>}
Remark: This may be useful when debugging a test.
Returns:
- Type
- Promise.<void>
highlightMatches(description, dontFilterByTypeopt) → {Promise.<number>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
description | A description object that defines the test object type and the set of properties and values that should be common to all objects that are highlighted. | |||
dontFilterByType | boolean |
<optional> | false | Set this parameter to true to avoid limiting the highlighted objects to a specific test object type. |
Returns:
- Type
- Promise.<number>
hover(duration) → {Promise.<void>}
Holds the cursor over an AI object. This method is not supported for mobile applications.
Parameters:
Name | Type | Description |
---|---|---|
duration | int | The number of seconds to hover on the AI object. This parameter is optional. (Default=2) |
Returns:
- Type
- Promise.<void>
longClick() → {Promise.<void>}
Returns:
- Type
- Promise.<void>
parent() → {*}
Returns:
- Type
- *
rightClick() → {Promise.<void>}
Returns:
- Type
- Promise.<void>
search(text) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to type into the search box. |
Returns:
- Type
- Promise.<void>
sendKeys(text) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
text | string | The text to type into the AI object. |
Returns:
- Type
- Promise.<void>
sendSecureKeys(encodedText) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
encodedText | string | The encoded text to type into the AI object. |
Returns:
- Type
- Promise.<void>
setState(state) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
state | boolean | Indicates whether this check box/toggle button will be checked. |
Returns:
- Type
- Promise.<void>
setText(encodedText) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
encodedText | string | The encoded text to type into the AI object. |
Returns:
- Type
- Promise.<void>
snapshot(optionsopt) → {Promise.<string>}
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object |
<optional> | An options object that defines the image capture preferences.
Properties
|
Returns:
- Type
- Promise.<string>
text() → {Promise.<string>}
Returns:
- Type
- Promise.<string>
verifyImageExists(imageToFind, similarityopt) → {Promise.<Object>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
imageToFind | string | A Base64 string representation of the image to look for within the test object's snapshot. | |
similarity | number |
<optional> | The minimum similarity between the two images (as a percentage), above which the find is considered a match. Default = 100. |
Returns:
- Type
- Promise.<Object>
verifyImageMatch(expectedImage, pixelToleranceopt, rgbToleranceopt) → {Promise.<boolean>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
expectedImage | string | A Base64 string representation of the image to compare to the test object snapshot. | |
pixelTolerance | number |
<optional> | The percentage of pixels that can differ between the two images, and still be considered a match. Default = 0. |
rgbTolerance | number |
<optional> | The percentage by which the RGB values of the pixels in the two images can differ, and still be considered a match. Default = 0. |
Returns:
- Type
- Promise.<boolean>
verifyImageMatchWithMask(expectedImage, maskAreaImage, pixelToleranceopt, rgbToleranceopt) → {Promise.<boolean>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
expectedImage | string | A Base64 string representation of the image to compare to the test object snapshot. | |
maskAreaImage | string | A Base64 string representation of the image mask area to use in the image comparison. | |
pixelTolerance | number |
<optional> | The percentage of pixels that can differ between the two images, and still be considered a match. Default = 0. |
rgbTolerance | number |
<optional> | The percentage by which the RGB values of the pixels in the two images can differ, and still be considered a match. Default = 0. |
Returns:
- Type
- Promise.<boolean>
waitUntilExists(timeoutopt) → {Promise.<boolean>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
timeout | number |
<optional> | The time (in seconds) to wait for this object to exist. By default, uses the object synchronization timeout defined in the runtime engine settings. |
Returns:
- Type
- Promise.<boolean>