Skip to content
Kelly Ferrone edited this page Sep 10, 2026 · 4 revisions

write

Type text into an input, textarea or contenteditable.

MCP tool write
HTTP POST /browser/write

Set submit to press Enter afterwards, which fills and submits a search box in one call. Returns the field's value read back off the element, so you can confirm the text actually landed.

Parameters

Name Type Required Default Notes
xpath string yes
text string yes
session_id string yes over HTTP The session_id returned by /browser/open. Required here.
url string no
clear boolean no true
submit boolean no false
wait_timeout integer no 30

Returns

Field Type Notes
value string The field's value read back off the element, so a caller can confirm the text landed.
url string Current URL after the action.
title string Page title after the action.

Errors are 400 for a bad argument, 401 without a token, 500 when the Grid refuses. Over MCP the same failures arrive as a tool error.

Example

MCP

write(xpath="…", text="…")

HTTP

curl -X POST $SELENIUM_FLOW/browser/write \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "session_id": "…",
    "xpath": "…",
    "text": "…"
  }'

← All actions · Installing · Deployment

Clone this wiki locally