Skip to content
Kelly Ferrone edited this page Sep 11, 2026 · 8 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.

Address the field with EITHER xpath OR css, never both and never neither.

To type a secret, pass value_from={"secret": {"name": ..., "key": ...}} instead of text. list_secrets shows what there is. You never see the value: the server reads it and types it, and the result comes back with value: null. A secret may only be used on the sites its owner allowed, checked against the page you are on, so navigate there first.

Parameters

Name Type Required Default Notes
text string no
xpath string no
css string no
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
value_from ValueFrom no

Returns

Field Type Notes
value string The field's value read back off the element, so a caller can confirm the text landed. Null for a write whose value came from a secret — that read is not performed at all, so the credential is never returned.
value_from string Present only when the value came from somewhere rather than being given: the kind of source it came from, never the value.
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()

HTTP

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

← All actions · Installing · Deployment

Clone this wiki locally