browser::act
Interact with the page: click (left/right/middle, single or double), hover, type, select a native <select> option, press, scroll, or drag (press at the start point, glide to x2/y2, release). Address elements with a ref from browser::elements (`n4`), browser::snapshot (`e3`) or a pick, or raw viewport coordinates. A ref is scrolled into view first, and a click, type or select on a disabled, hidden or covered element is refused instead of landing on whatever is on top. Typing into an input or textarea by ref replaces its value. Returns once the page had a moment to react.
- actionstringrequired
`click`, `hover`, `type`, `select`, `press`, `scroll`, or `drag`.
- buttonstring
Mouse button for `click`: `left` (default), `right`, or `middle`.
- click_countinteger· uint32min 0
Clicks in the gesture: 2 double-clicks (`click` only, default 1).
- delta_ynumber· double
Scroll distance in pixels; positive scrolls down (`scroll`).
- keystring
Key name for `press`: Enter, Tab, Escape, Backspace, Delete, ArrowUp/Down/Left/Right, Home, End, PageUp, PageDown.
- optionstring
Option to choose (`select`, native `<select>` only): its value or visible label.
- refstring
Element ref from `browser::elements` (`n4`), `browser::snapshot` (`e3`), `browser::dom::read` (`d7`) or `browser::picked` (`p1`). A click, type or select by ref is refused when the element is disabled, hidden or covered. Refs die on navigation; re-read the page after.
- session_idstringrequired
- textstring
Text to insert (`type`). With a ref to an `<input>` or `<textarea>` it replaces the current value; otherwise it is inserted at the caret.
- xnumber· double
Viewport x, when acting by coordinates instead of ref.
- x2number· double
Drag end x, in viewport pixels (`drag`). The start is `x`/`y` or a `ref`; the end is `x2`/`y2`.
- ynumber· double
Viewport y, when acting by coordinates instead of ref.
- y2number· double
Drag end y, in viewport pixels (`drag`).
- detailstringrequired
What was done, for the transcript.
- okbooleanrequired