Skip to main content
Version: 9.0.0

Date Range

A Date Range controls allows specifying two dates. It is possible to locate a date range element by following attributes:

NameParameter(s)TypeDescription
dateRangeByDataTestIddataTestIdstringSearches for a date range by the value of a data-test-id attribute
dateRangeByXPathxpathstringSearches 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 😉 👩🏻‍💻

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?{soft?: boolean}Checks if the element exists and is visible
shouldNotBeVisibleoptions?{soft?: boolean}Checks if the element exists but is not visible
shouldHaveInnerTextindexnumberChecks if the element's inner text by the given index contains the given string
valuestring
options?{soft?: boolean }
shouldNotHaveInnerTextindexnumberChecks if the element's inner text by the given index does not contain the given string
valuestring
options?{soft?: boolean }
options?{soft?: boolean }
shouldHaveValuesvalue1stringChecks if the element's value contains given strings
value2string
options?{soft?: boolean }
shouldHaveValuevaluestringChecks if the element's value contains the given string
options?{soft?: boolean }
shouldNotHaveValuevaluestringChecks if the element's value does not contain the given string
options?{soft?: boolean }

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