interact - kubed-io/selenium-flow GitHub Wiki

interact

A mouse action on an element: click, double_click, right_click, hover or scroll_to.

MCP tool interact
HTTP POST /browser/interact/{action}

hover leaves the pointer where it put it, so a menu that opens on hover stays open for the next call: hover it, then click inside. scroll_to brings an off-screen element into view.

The pointer jumps onto the element unless glide=true, which moves it in small steps, for interfaces that react to movement: sliders, sortable lists, menus that track direction. To drag something, use drag.

Returns the URL and title after the action, so a navigation it caused shows.

Parameters

Name Type Required Default
action string yes โ€”
selector Selector no โ€”
url string no โ€”
wait_timeout integer no 30
glide boolean no false

Every call names its workspace: an X-Workspace header, or ?workspace=<name>. Sending both is refused. See Workspaces.

Returns

Field Type Notes
action string The gesture that was performed.
glided boolean Whether the pointer travelled to the element in steps rather than jumping. Absent for scroll_to, which moves the page.
nudged boolean Present when the pointer was already inside the target and had to step away first, so the move it was asked for was a move.
glide_note string Why a requested glide was a jump instead.
url string Current URL after the action.
title string Page title after the action.
site_data object Present only when site data was restored, skipped or forgotten in this call.
page object Present only when this browser was opened with capture=true and the page reported a failure while the call ran: what it caused, and where to read it.

Errors

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.
413 The body is over its cap: 1 MiB of JSON, 64 MiB of upload, 1 MiB of flow YAML. Send less; retrying it unchanged will fail again.
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.

Example

MCP

interact(action="click")

HTTP

curl -X POST $SELENIUM_FLOW/browser/interact/click \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace: $WORKSPACE"

โ† All actions ยท Installing ยท Deployment

โš ๏ธ **GitHub.com Fallback** โš ๏ธ