Browse the docs

Press keys in the page

Sends key events to the focused element or to an element.

Press keys in the page

Details #

keys is one or more keys, like Enter, Tab, Escape, cmd+a, shift+Tab or a, separated by spaces. Typing a letter into a field inserts it. Some sites ignore keys a script sends; the pressKeys step sends real ones.

Parameters #

ParameterTypeRequiredValuesWhat it does
keystextYesRequired.
browserone ofsafari chrome front
selectortextSend them to this element.
tabany value
timeoutnumber, tab.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Submit with Enter
Do
  1. Press “Enter” in the page
Open in Switchboard to try it

Gotchas #

  • Synthetic keys are not trusted keys; a site can tell.