Browse the docs

An element is in a state

Passes when an element on the page exists, is visible, enabled, checked, focused or in view, or is absent.

selector is state

Details #

state is exists (the default), absent, visible, hidden, enabled, disabled, checked, unchecked, focused or inViewport. A missing element counts as hidden. With text, only elements whose text contains it (or matches /regex/) count.

In a waitFor or waitChange step the condition is checked again and again, so "wait until the spinner is gone" is a browser.element condition with absent.

Parameters #

ParameterTypeRequiredValuesWhat it does
selectortextYesThe element. Required.
htmltext
impersonateone ofauto chrome safari none
sampleany value
signIntext
stateone ofexists absent visible hidden enabled disabled checked unchecked focused inViewportOne of the states above.
tabany valueWhich tab.
texttextOnly elements with this text.
urltext, html, via, signIn, impersonate: Check a page nobody has open. A fetched page has no layout, so visible, hidden, focused and inViewport need an open tab; the other states work.
viaone offetch tab

Examples #

Click Continue when it is enabled
Do
  1. Click “text=Continue” on the page
Open in Switchboard to try it

Gotchas #

  • focused and inViewport need the page to be the front tab to be meaningful.