Skip to main content
Version: 7.5.5

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 😉 👩🏻‍💻

NameParameter(s)TypeDescription
setstartDatestringSets the value. Accepts string or number, it is also possible to select the element by index (in options parameter)
endDatestring

Common assertions

NameParameter(s)TypeDescription
shouldBeVisibleoptions?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }Checks if the element exists and is visible
shouldNotBeVisibleoptions?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }Checks if the element exists but is not visible
shouldHaveTextvaluestringChecks if the element's inner text contains a given string
options?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }
shouldNotHaveTextvaluestringChecks if the element's inner text does not contain a given string
options?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }
shouldHaveValuevaluestringChecks if the element's value contains a given string
options?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }
shouldNotHaveValuevaluestringChecks if the element's value does not contain a given string
options?{ index?: number, timeout?: number, assertionTimeout?: number, interval?: number, retries?: number }

Other helpers

NameParameter(s)TypeDescription
clickoptions?{ timeout?: number, interval?: number, retries?: number }Clicks in the field

IsVisible and IsExists functions

NameParameter(s)TypeDescription
isVisibleoptions?{ timeout?: number, interval?: number, retries?: number }Returns true if the element exists and is visible
isExistsoptions?{ timeout?: number, interval?: number, retries?: number }Returns true if the element exists