Press
The Press step simulates a keyboard key press, optionally combined with modifier keys, to replicate keyboard-based interactions in the browser.
​
🎯 Purpose​
This step allows Snappit to programmatically trigger keyboard shortcuts or simulate keyboard navigation, enabling automation of interactions that depend on key presses.
🧠Behavior​
- Locates the target element using the provided target (if specified)
- Focuses the target element if available
- Simulates a keyboard event using the specified key
- Applies optional modifier keys such as
Control
,Shift
,Alt
, orMeta
- Dispatches
keydown
,keypress
, andkeyup
events in sequence - Proceeds to the next step after the press simulation is complete
✅ Use Cases​
- Triggering form submission with
Enter
- Activating keyboard shortcuts like
Control + Enter
- Navigating through UI elements using
Arrow
keys - Simulating Escape or Tab to close modals or shift focus
By using the Press step, Snappit enables precise keyboard-driven automation for workflows where mouse input is not enough or keyboard shortcuts are more efficient.