Actions - kubed-io/selenium-flow GitHub Wiki

Actions

Every action is an MCP tool and an HTTP endpoint with the same parameters, and every read is an MCP resource and an HTTP endpoint. A test fails the build if one exists without the other. A client that cannot read resources reads the same URIs with read_resource.

Browser actions

Everything you can do to a page.

MCP Endpoint Does
open_session POST /browser Open a session in this workspace, or pick up the one it was using.
workspace://current GET /browser What this workspace is, and whether it holds a browser.
navigate POST /browser/navigate Go to a URL. Returns the URL and title the browser ended on.
interact POST /browser/interact/{action} A mouse action on an element: click, double_click, right_click, hover or scroll_to.
drag POST /browser/drag Drag an element onto another element (to), or by an offset in pixels (by_x, by_y); give one or the other. A range slider is by_x; a card into a column is to.
write POST /browser/write Type into an input, textarea or contenteditable, and read the value back so
press_key POST /browser/press-key Press a key or a combination, at an element (selector) or wherever focus already is.
extract POST /browser/extract Read an element's visible text and HTML.
assert POST /browser/assert Check the page with JavaScript that must return true; otherwise the call fails. Return a boolean, not the thing itself: return !!document.querySelector('#total').
outline POST /browser/outline Map the page: the elements worth acting on, each with a selector checked to match exactly one element, and whether it can be used now.
screenshot POST /browser/screenshot Capture a PNG of the viewport, of one element (selector), or of the whole
print POST /browser/print Print the page into the workspace's files, kept past the browser.
execute_script POST /browser/script Run JavaScript in the page and return what it returns.
frame POST /browser/frame Move into an iframe (switch, with a selector or an index), up one level (parent), or back to the page (default).
dialog POST /browser/dialog Answer a native alert, confirm or prompt: accept, dismiss, read (see the message without answering), or send_text (fill a prompt with text and accept it).
resize POST /browser/resize Resize the browser window.
upload_file POST /browser/upload Attach a file to a file input (selector). Give exactly one source:
end_browser DELETE /browser Quit the browser, keeping the workspace and its context.

Flows

A sequence of the actions above, saved under a name and run in one call. See Flows for what a flow document looks like.

MCP Endpoint Does
flow://flows GET /flows Every flow this workspace can run.
flow://flows/{name} GET /flows/{name} One saved flow, with its steps.
flow://schema GET /schemas/flow The shape of a flow document.
save_flow PUT /flows/{name} Create or replace a flow.
run_flow POST /flows/{name}/runs Run a saved flow.
delete_flow DELETE /flows/{name} Delete one of this workspace's flows.

Files

What a workspace's browsers have produced, and how to keep one past the browser that made it. See Files.

MCP Endpoint Does
workspace://files GET /files Files' own listing, and its three folders.
workspace://files/screenshots GET /files/screenshots This workspace's saved screenshots, not yet kept.
workspace://files/recordings GET /files/recordings This workspace's recordings, not yet kept.
workspace://files/downloads GET /files/downloads The downloads of the session open in this workspace.
keep_file PUT /files/{folder}/{name}/kept Moves a screenshot or a recording into Files, or copies a download there.

Secrets

The secrets a caller may type into a field without ever seeing them. See Secrets.

MCP Endpoint Does
secret://secrets GET /secrets The secrets this caller may bind.

Site data

The cookies and storage a workspace keeps, so a browser that replaces another comes back signed in. See Workspaces.

MCP Endpoint Does
save_site_data POST /browser/save-site-data Save this workspace's site data, so a new browser comes back signed in.
workspace://site-data GET /site-data The sites this workspace has saved data for.
workspace://site-data/{site} GET /site-data/{site} One site's saved cookies and storage.

Console and network

What a page logged and fetched, kept when a session is opened with capture=true. The lists are the resources workspace://console and workspace://network.

MCP Endpoint Does
network_body POST /browser/network-body Fetch the response body of one request the page made, by its id from

Every call names its workspace — an X-Workspace header or ?workspace= on the URL. There is no session id anywhere; see Workspaces.


Installing · Deployment · Administration