Spotted something off?Report on Discord
guides

Keyboard

Simulate keyboard key presses such as Enter, Tab, or Arrow keys during a browser session.

Updated May 28, 2025

Simulate specific keyboard actions during your scraping session, useful for navigation, form control, or clearing fields.

Command

"keyboard"

This browser action triggers a specific key press event, such as Enter, Tab, or ArrowDown, optionally on a selected element.

Parameters

Parameter Type Required Description
value string Yes The keyboard action to simulate. Must be one of: tab, enter, space, arrowdown, arrowup, arrowleft, arrowright, backspace, clear.
cssSelector string No Required only when using clear. Specifies which element the action applies to.

Supported `value` Options

Action Description
tab Simulates pressing the Tab key
enter Simulates pressing Enter
space Simulates pressing Spacebar
arrowdown Scrolls or moves focus down
arrowup Scrolls or moves focus up
arrowleft Moves cursor/focus left
arrowright Moves cursor/focus right
backspace Deletes one character
clear Clears the value of an input field (requires cssSelector)

Example

bash12 lines

Notes

  • Submit a form using enter after typing into an input field.
  • Navigate a dropdown or form with tab and arrow keys.
  • Clear a field before typing a new value using clear.
  • Combine with type, click, or wait for more natural form interactions.
  • Make sure the cssSelector targets an interactive or input element when using clear.