batch
Runs several browser actions in one call, in order, and stops at the first failure. Use it to fill and submit forms or repeat a known flow across many items.
Instructions
Run several actions in one call, in order, and stop at the first one that fails. Use it for work whose steps you already know: fill the fields of a form and submit it, or repeat one flow for a list of items.
Each action is an object with tool and that tool's arguments, for
example [{"tool": "click", "index": "New meeting"}, {"tool": "type_text", "index": "Title", "text": "Kickoff"}, {"tool": "select_option", "index": "Duration", "option": "45 minutes"}, {"tool": "click", "index": "Save"}, {"tool": "read"}]. Tools: navigate,
click, double_click, click_at, click_frame, type_text, select_option,
press_key, drag, scroll, wait_for, go_back, go_forward, read.
index is a number from a snapshot (valid until the page navigates) or
the element's visible name. Use a name for an element that an earlier
step of the batch creates or that is on the next page: a dialog's fields,
a menu's entries, the row to open. A batch can thus cross dialogs and
pages. read returns the page's text at that point (find limits it
to passages); lines that an earlier read of the batch gave are left
out.
The result has one line for each step with what it changed and the text
it showed, then what differs from the page before the batch. From the
command line each action is one quoted argument or one line on stdin:
wraith call batch 'click "New meeting"' 'type_text Title Kickoff'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"actions": "<actions>"
},
"name": "batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actions | Yes | ||
| include_snapshot | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |