-
Notifications
You must be signed in to change notification settings - Fork 0
dialog
Kelly Ferrone edited this page Sep 12, 2026
·
5 revisions
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.
| 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 |
| 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. |
| Status | Means |
|---|---|
400 |
The request cannot succeed as sent — a missing field, a value that was rejected, or a locator that matched nothing before the wait ran out. Do not retry it unchanged. |
401 |
Missing or wrong bearer token. |
404 |
No such browser session. It ended, the Grid reaped it, or the id was never real. Open a new one and retry. |
500 |
Something failed that this server did not expect. |
503 |
The Grid could not serve this — unreachable, or no free slot for a new browser. Worth retrying after a wait. |
Over MCP the same failures arrive as a tool error.
MCP
dialog()
HTTP
curl -X POST $SELENIUM_FLOW/browser/dialog \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"session_id": "…"
}'The action pages are generated from openapi.yaml, which is itself generated from the live MCP tool schemas — so they describe the server that shipped, not the one someone remembered. Prose belongs in wiki-notes/<tool>.md in the repo.
selenium-flow · MIT
Start here
Guides
Lifecycle
Going places
Doing things
Getting things out