Skip to main content

untilAnySelectionIs

Waits until selection state of any element from the given elements, matches the desired state. Works for html elements that keep a selected state such as checkbox, radio.

A list of elementIds or elementIds as multiple arguments can be supplied.

A use case is to wait for a selection from a group of radio buttons.

untilAnySelectionIs(desiredSelectionState, elemId, elemId, ...)
# Or
untilAnySelectionIs(desiredSelectionState, [elemId, elemId, ...])

Uses Element access timeout.

Parameters#

  • desiredSelectionState: A boolean indicating the desired selection state of the element..
  • elemId: The target element

Returns#

  • elemId that matches the selection state.

Example#

# wait for a selection in a radio groupuntilAnySelectionIs(true, findElements('role', by.name))