Skip to main content

Module keyboard

Module keyboard 

Source
Expand description

Page-level keyboard interactions.

This module provides functions for sending keyboard events at the page level, independent of any specific element. This is useful for:

  • Dismissing dialogs (Escape)
  • Submitting forms (Enter)
  • Tab navigation
  • Keyboard shortcuts (e.g. Control+A)

Functionsยง

key_down
Hold a key down at the page level.
key_up
Release a held key at the page level.
press_key
Press a key at the page level.
type_text
Type text at the page level (dispatches key events for each character).