Skip to navigation

Type keys (detailed)

Referenced In

Fields

FieldTypeDescriptionDefault
keysone of:
- string
- array of string
Required. Sequence of keys to enter.—
inputDelaynumberOptional. Delay in milliseconds between each key press during a recording, and between each keystroke sent to a process surface. Not applied on app surfaces in this phase — the native driver types the value atomically.100
surfaceone of:
- string
- object(Process surface)
- object(Browser surface)
- object(App surface)
Optional. The surface a step acts on. Omit to act on the active surface — the most recently opened, focused, or explicitly targeted surface, whatever its kind. Specifying a surface switches the active surface for the steps that follow. Supports background processes, browser windows/tabs, and native app windows.—
waitUntilone of:
- object(Process readiness)
- object(Browser readiness)
- object(App readiness)
Optional. After sending the keys, wait until the surface is ready. Requires a surface; the allowed conditions depend on the surface kind: a process surface accepts stdio/delayMs, a browser surface accepts networkIdleTime/domIdleTime/find, an app surface accepts delayMs/find. No condition applies by default.—
timeoutintegerOptional. Maximum time in milliseconds to wait for waitUntil after sending the keys.

Minimum: 0
5000
selectorstringOptional. Selector for the element to type into. If not specified, the typing occurs in the active element.—
elementTextstringOptional. Display text of the element to type into. If combined with other element finding fields, the element must match all specified criteria.—
elementIdstringOptional. ID attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.—
elementTestIdstringOptional. data-testid attribute of the element to find. Supports exact match or regex pattern using /pattern/ syntax.—
elementClassone of:
- string
- array of string
Optional. Class or array of classes that the element must have. Each class supports exact match or regex pattern using /pattern/ syntax. Element must have all specified classes.—
elementAttributeobjectOptional. Object of attribute key-value pairs that the element must have. Values can be strings (supporting /pattern/ regex), numbers, or booleans. Boolean true matches attribute presence, false matches absence.—
elementAriastringOptional. Computed accessible name of the element per ARIA specification. Supports exact match or regex pattern using /pattern/ syntax.—

Examples

{
"keys": "example",
"inputDelay": 100,
"surface": "example",
"waitUntil": {
"stdio": "example",
"delayMs": 42
},
"timeout": 5000,
"selector": "example",
"elementText": "example",
"elementId": "example",
"elementTestId": "example",
"elementClass": "example",
"elementAttribute": {},
"elementAria": "example"
}