Skip to main content
Version: 9.0.0

Any Picker

It is possible to find an Any Picker element by following attributes:

NameParameter(s)TypeDescription
anypickerByDataTestIddataTestIdstringSearches for an any picker field by value of a Pega data-test-id attribute
anypickerByIdidstringSearches for an any picker field by value of an id attribute
anypickerByCsscssstringSearches for an element by a custom css selector
anypickerByXPathxpathstringSearches for an element by a custom xpath selector

Main action functions

NameParameter(s)TypeDescription
selectValuevaluestringSelects one value from the list with possible options
openListOpens the list with possible options by clicking an arrow icon
deleteSelectedResultvaluestringDeletes one value from Anypicker field

Assertions

Specific assertions

NameParameter(s)TypeDescription
resultsListShouldBeVisibleoptions{ timeout?: number, assertionTimeout?: number, interval?: number, retries?: number, soft?: boolean }Checks if the list with possible values is visible
resultsListShouldNotBeVisibleoptions{ timeout?: number, assertionTimeout?: number, interval?: number, retries?: number, soft?: boolean }Checks if the list with possible values is not visible

Common assertions

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

Other helpers

NameParameter(s)TypeDescription
focusoptions?{ index?: number, timeout?: number, interval?: number, retries?: number }Focuses the element. A focused element is ready to be activated with a keyboard or any keyboard-emulating technology
pressTabSimulates "press Tab key" action
clickoptions?{ index?: number, timeout?: number, interval?: number, retries?: number }Clicks in the field