-
Notifications
You must be signed in to change notification settings - Fork 0
interact
Perform a mouse action on an element.
| MCP tool | interact |
| HTTP | POST /browser/interact |
action is one of: click, double_click, right_click, hover, scroll_to.
click is the common case. hover opens menus that only appear on mouse-over. right_click opens context menus. scroll_to brings an off-screen element into view, which is often what a click on a long page needs first.
Returns the URL and title after the action, so any navigation it caused is visible in the result.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
action |
string | yes | — | |
xpath |
string | yes | — | |
session_id |
string | yes over HTTP | — | The session_id returned by /browser/open. Required here. |
url |
string | no | — | |
wait_timeout |
integer | no | 30 |
| Field | Type | Notes |
|---|---|---|
action |
string | The gesture that was performed. |
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.
MCP
interact(action="…", xpath="…")
HTTP
curl -X POST $SELENIUM_FLOW/browser/interact \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"session_id": "…",
"action": "…",
"xpath": "…"
}'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
Lifecycle
Going places
Doing things
Getting things out