class: keyboard
[24:14] (extern: com.lehman.aussom.AKeyboard) extends: object
The keyboard class provides low-level keyboard input simulation for a page. Instances are obtained via page.keyboard(). Use locator.press() or locator.fill() for higher-level input; use keyboard for raw key sequences.
Methods
-
down (
string Key)Dispatches a keydown event for the given key, followed by keypress if appropriate. The key is held down until up() or press() is called.
- @p
Keyis a string key name (e.g. 'Shift', 'Control', 'ArrowLeft'). - @r
Thisobject.
- @p
-
up (
string Key)Dispatches a keyup event for the given key.
- @p
Keyis a string key name. - @r
Thisobject.
- @p
-
press (
string Key)Dispatches keydown, keypress/input, and keyup events for the given key in sequence. Shorthand for down() followed immediately by up().
- @p
Keyis a string key name or combination (e.g. 'Enter', 'Control+a'). - @r
Thisobject.
- @p
-
type (
string Text)Sends a keydown, input, and keyup sequence for each character in the provided text string.
- @p
Textis a string of characters to type. - @r
Thisobject.
- @p
-
insertText (
string Text)Dispatches an input event with the given text. Does not fire keydown or keyup events. Use for pasting text into a focused element.
- @p
Textis a string of characters to insert. - @r
Thisobject.
- @p