Date Range
A Date Range controls allows specifying two dates. It is possible to define this control via data-test-id only:
await pega.dateRangeByDataTestId(`Date Range`).set(`24/02/2022`, `28/10/2022`);
At the moment, set
is the only one main action function available, if you need something more specific - open a new feature request, and we will be happy to provide it for you 😉 👩🏻💻
Name | Parameter(s) | Type | Description |
---|---|---|---|
set | startDate | string | Sets the value. Accepts string or number, it is also possible to select the element by index (in options parameter) |
endDate | string |
Common assertions
Name | Parameter(s) | Type | Description |
---|---|---|---|
shouldBeVisible | options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } | Checks if the element exists and is visible |
shouldNotBeVisible | options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } | Checks if the element exists but is not visible |
shouldHaveText | value | string | Checks if the element's inner text contains a given string |
options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } | ||
shouldNotHaveText | value | string | Checks if the element's inner text does not contain a given string |
options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } | ||
shouldHaveValue | value | string | Checks if the element's value contains a given string |
options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } | ||
shouldNotHaveValue | value | string | Checks if the element's value does not contain a given string |
options? | { index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number } |
Other helpers
Name | Parameter(s) | Type | Description |
---|---|---|---|
click | options? | { timeout?: number, interval?: number, retries?: number } | Clicks in the field |
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 |