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

dialog

Answer a native alert, confirm or prompt dialog.

MCP tool dialog
HTTP POST /browser/dialog

action is one of: accept, dismiss, read, send_text. Use read to see the message without answering, accept to confirm, dismiss to cancel, and send_text with text to fill a prompt and accept it.

An open dialog blocks every other command, so if a call fails complaining about an unexpected alert, this is how you clear it.

Parameters

Name Type Required Default Notes
action string no accept
text string no
session_id string yes over HTTP The session_id returned by /browser/open. Required here.
wait_timeout integer no 10

Returns

Field Type Notes
action string What was done with the dialog.
message string The dialog's text, read before it was answered.
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

dialog()

HTTP

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

← All actions · Installing · Deployment

Clone this wiki locally