Documentation
¶
Overview ¶
Package controller can simulate user interaction
User interaction is primarily keyboard and mouse input. Mouse input is primarily clicking elements. Keyboard input should also handle:
- Move focus when pressing `tab` - Submit a form when pressing `enter` in a form field
Assuming that the events are not cancelled, and forms pass validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyboardController ¶
KeyboardController simulates the user typing a sequence of keys.
func (KeyboardController) SendKey ¶
func (c KeyboardController) SendKey(k key.Key)
SendKey simulates the input of a single key.
If c has no Window, this function will produce no effects.
func (KeyboardController) SendKeys ¶
func (c KeyboardController) SendKeys(keys iter.Seq[key.Key])
SendKeys simulates the user typing a sequence of keys. The key package contains functionality to generate sequences of keys from an input string.
Ignored if no Window is assigned.
func (KeyboardController) SendText ¶ added in v0.11.3
func (c KeyboardController) SendText(text string)