frame - kubed-io/selenium-flow GitHub Wiki
Move into an iframe (switch, with a selector or an index), up one level (parent), or back to the page (default).
| MCP tool | frame |
| HTTP | POST /browser/frame |
Elements inside a frame are invisible to every tool until you switch in, and the switch sticks for every later call. If a selector that should work keeps failing, read workspace://current: in_frame says where you are.
| Name | Type | Required | Default |
|---|---|---|---|
action |
string | no | switch |
selector |
Selector | no | โ |
index |
integer | no | โ |
wait_timeout |
integer | no | 30 |
Every call names its workspace: an X-Workspace header, or
?workspace=<name>. Sending both is refused. See Workspaces.
| Field | Type | Notes |
|---|---|---|
action |
string | The switch that was performed. |
in_frame |
boolean | Whether the session is now inside a frame. |
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. |
| 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.
MCP
frame()
HTTP
curl -X POST $SELENIUM_FLOW/browser/frame \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace: $WORKSPACE"