Date Range
A Date Range controls allows specifying two dates. It is possible to locate a date range element by following attributes:
Name | Parameter(s) | Type | Description |
---|---|---|---|
dateRangeByDataTestId | dataTestId | string | Searches for a date range by the value of a data-test-id attribute |
dateRangeByXPath | xpath | string | Searches for a date range by a custom xpath selector |
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? | {soft?: boolean} | Checks if the element exists and is visible |
shouldNotBeVisible | options? | {soft?: boolean} | Checks if the element exists but is not visible |
shouldHaveInnerText | index | number | Checks if the element's inner text by the given index contains the given string |
value | string | ||
options? | {soft?: boolean } | ||
shouldNotHaveInnerText | index | number | Checks if the element's inner text by the given index does not contain the given string |
value | string | ||
options? | {soft?: boolean } | ||
options? | {soft?: boolean } | ||
shouldHaveValues | value1 | string | Checks if the element's value contains given strings |
value2 | string | ||
options? | {soft?: boolean } | ||
shouldHaveValue | value | string | Checks if the element's value contains the given string |
options? | {soft?: boolean } | ||
shouldNotHaveValue | value | string | Checks if the element's value does not contain the given string |
options? | {soft?: boolean } |
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 |