Image
It is possible to find an image element by following attributes:
Name | Parameter(s) | Type | Description |
---|---|---|---|
image | dataTestId | string | Searches for an image by value of a Pega data-test-id attribute, same as imageByTestId |
imageByTestId | dataTestId | string | Searches for an image by value of a Pega data-test-id attribute, same as image |
imageById | id | string | Searches for an image by value of an id attribute |
imageBy | attributeName | string | Searches for an image by an attribute name and value |
attributeValue | string | ||
imageBySource | src | string | Searches for an image by value of src attribute |
Assertions
Assertions include many methods for filtering by index because quite often readonly text fields have the same data-test-ids and it`s difficult to differentiate them.
Name | Parameter(s) | Type | Description |
---|---|---|---|
shouldBeVisible | options? | { timeout?: number, interval?: number, retries?: number } | Checks if the element exists and visible |
shouldBeVisibleByIndex | index | number | Checks if the element exists and visible by a given index |
options? | { timeout?: number, interval?: number, retries?: number } | ||
shouldExist | options? | { timeout?: number, interval?: number, retries?: number } | Checks if the element exists |
shouldNotBeVisible | options? | { timeout?: number, interval?: number, retries?: number } | Checks if the element exists but is not visible |
shouldNotBeVisibleByIndex | index | number | Checks if the element exists but is not visible by a given index |
options? | { timeout?: number, interval?: number, retries?: number } | ||
shouldNotExist | options? | { timeout?: number, interval?: number, retries?: number } | Checks if the element does not exist |
Wait for
functions
Simple wait for visibility functions
Name | Parameter(s) | Type | Description |
---|---|---|---|
waitUntilVisibility | options? | { timeout?: number, interval?: number, retries?: number } | Waits for the element to be visible |
waitUntilInvisibility | options? | { timeout?: number, interval?: number, retries?: number } | Waits for the element to be invisible |
waitUntilElementExists | options? | { timeout?: number, interval?: number, retries?: number } | Waits for the element to exist |
waitUntilElementNotExist | options? | { timeout?: number, interval?: number, retries?: number } | Waits for the element not to exist |
Complex wait for visibility functions
Allow filtering of available elements by index, text, attribute:
Name | Parameter(s) | Type | Description |
---|---|---|---|
waitUntilVisibilityByAttribute | attributeName | string | Filters collection of elements by attribute and waits for the element to be visible |
attributeValue | string | ||
options? | { timeout?: number, interval?: number, retries?: number } | ||
waitUntilVisibilityByIndex | index | number | Filters collection of elements by index and waits for the element to be visible |
options? | { timeout?: number, interval?: number, retries?: number } | ||
waitUntilInvisibilityByIndex | index | number | Filters collection of elements by index and waits for the element not to be visible |
options? | { timeout?: number, interval?: number, retries?: number } |
Actionability check
ActionabilityCheckTypes == attached
| stable
| visible
| enabled
| editable
Name | Parameter(s) | Type | Description |
---|---|---|---|
waitForSelectActionabilityCheck | check types | [] | Waits for the element to pass all the selected actionability check types |
isFilterByVisibility | boolean (true by default) |
e.g.
await pega.image('Image').waitForSelectActionabilityCheck(['attached', 'visible', 'stable']);
IsVisible and IsExists functions
Name | Parameter(s) | Type | Description |
---|---|---|---|
isVisible | options? | { timeout?: number, interval?: number, retries?: number } | Returns true if the element exists and is visible |
isExists | options? | { timeout?: number, interval?: number, retries?: number } | Returns true if the element exists |
info
For the logo image, there is a specific logo control. However, it is still possible to use an image one instead.