Endpoint
Authentication
No authentication required. All endpoints useuserId for session isolation.
Path parameters
The unique identifier of the tab
Body parameters
User identifier for session isolation
Element reference from snapshot (e.g.,
e1, e2). Either ref or selector is required.CSS selector for the target element. Either
ref or selector is required.The text to type into the element
Whether to press Enter after typing the text (useful for search boxes)
Maximum time in milliseconds to wait for the element
Response
Always
true on successBehavior
The/type endpoint uses Playwright’s .fill() method, which:
- Clears the existing value in the input field
- Types the new text
- Triggers appropriate input events (
input,change, etc.) - Works with
<input>,<textarea>, andcontenteditableelements
pressEnter is true, the endpoint will additionally call /press with key=Enter after typing.
Special characters
Thetext parameter supports all Unicode characters. For special keys (Tab, Escape, Arrow keys, etc.), use the /press endpoint instead.
Error codes
400- Missing required parameter (userId,text, or bothrefandselector)404- Tab not found500- Type failed (element not found, timeout, unknown ref)
Error messages
- Unknown ref:
Unknown ref: e99 - Element not found:
Timeout 10000ms exceeded - Element not editable:
Element is not an input, textarea, or contenteditable
Examples
Type into search box by reference
Type and submit search
Type by CSS selector
Type with custom timeout
Related endpoints
- POST /tabs/:tabId/press - Press special keys (Enter, Tab, Escape, etc.)
- POST /tabs/:tabId/click - Click an element before typing
- GET /tabs/:tabId/snapshot - Get element references for interactive elements
Tab locking
Type operations are serialized per tab to prevent race conditions. If another operation is in progress, the request will wait up to 30 seconds before proceeding.Best practices
- Always call
/snapshotafter navigation to get fresh element refs - Use
ref(notselector) when possible - refs target semantic roles (textbox, searchbox) - For search forms, use
pressEnter: trueinstead of separate click on submit button - Clear existing values are automatically cleared before typing
- For multi-step forms, wait for page ready after each submit