Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/steerlabs/opensteer/llms.txt

Use this file to discover all available pages before exploring further.

Overview

OpenSteer provides methods for keyboard input beyond the standard input() method. These allow you to press individual keys and type text character-by-character.

Methods

pressKey()

Press a keyboard key. Useful for special keys like Enter, Tab, Escape, arrow keys, etc.
await opensteer.pressKey(key: string): Promise<void>
key
string
required
The key to press. Can be a character or special key name like 'Enter', 'Tab', 'Escape', 'ArrowDown', etc.

Examples

Press Enter key

await opensteer.pressKey('Enter')
await opensteer.pressKey('ArrowDown')
await opensteer.pressKey('ArrowDown')
await opensteer.pressKey('Enter')

Press Escape to close dialog

await opensteer.pressKey('Escape')

Common special keys

await opensteer.pressKey('Tab')
await opensteer.pressKey('Backspace')
await opensteer.pressKey('Delete')
await opensteer.pressKey('Home')
await opensteer.pressKey('End')
await opensteer.pressKey('PageUp')
await opensteer.pressKey('PageDown')

type()

Type text character-by-character into the currently focused element. Unlike input(), this doesn’t target a specific element.
await opensteer.type(text: string): Promise<void>
text
string
required
The text to type

Examples

Type into focused element

// Focus an element first
await opensteer.click({ description: 'search box' })

// Then type
await opensteer.type('OpenSteer browser automation')

Type and submit

await opensteer.click({ description: 'email input' })
await opensteer.type('user@example.com')
await opensteer.pressKey('Tab')
await opensteer.type('password123')
await opensteer.pressKey('Enter')

Comparison: type() vs input()

Featuretype()input()
Element targetingUses currently focused elementTargets specific element
ClearingDoes not clear existing textClears by default (clear: true)
SpeedCharacter-by-character (slower)Direct value assignment (faster)
Use caseKeyboard simulation, autocompleteForm filling, replacing values
Use input() for most form filling scenarios. Use type() when you need to simulate real keyboard input or trigger autocomplete/search suggestions.

Build docs developers (and LLMs) love