# browserscale — full documentation Generated from the source MDX and Go/TypeScript doc-comments. URLs point to the live site; each page is also available as raw Markdown at the .md alternate listed in llms.txt. > browserscale runs real Chromium browsers in the cloud and rebuilds the parts browser automation keeps failing on — waits, clicks and frames are handled inside the browser engine instead of being approximated from outside. Rent an isolated session in under 250 ms and drive it from Go (`browserscale-go`), TypeScript (`browserscale-ts`), a script running beside the page (BrowserVM) or any MCP client. ## Key capabilities ### Acting on the page - **Clicks that check before they press** — the element is scrolled genuinely into view (through nested scroll containers and up the frame chain), held until it stops moving, approached on a human pointer path, and the exact pixel is verified to belong to it across process boundaries before the button goes down. Covered, it re-aims at the visible part or steps out of a hover overlay's way; still blocked, it refuses with a `ClickError` naming the element in the way. - **Input the way hardware sends it** — pointer and key events take the path a real mouse and keyboard take, with none of the markers of remote-controlled input; typing follows the session region's keyboard layout with per-character timing that varies like a hand. - **Failures you can act on** — every command answers with success or a stable error code (`not_found`, `occluded_after_evade`, `timeout`, …) plus typed detail (`ClickError`, `WaitError`, `FillError`, …), so code and models repair a failure instead of blindly retrying. ### Waiting & reacting - **Waits the page reports, not a poll** — each document tells the wait the moment a condition holds, usually within a frame; an idle wait does no work, and more conditions or frames cost a registration, not another loop. By default a match means visible and holding still, not merely present in the DOM; `Wait` races several conditions — elements, a captcha challenge (`Captcha`), a request or response (`Request`, `Response`) — and says which one matched, in which frame. - **Timeouts that explain themselves** — a `WaitError` says per condition how far it got: `not_found`, `found_hidden`, `found_occluded` (with the blocker), `pending_steady` or `not_seen`. - **Reactions** — `AddReaction` arms a one-shot handler in the browser for the cookie banner or popup that may or may not appear. It fires between your calls or pauses the running one at a safe point, across every frame and navigation, and retires itself — a click blocked by a modal lands because the reaction cleared the modal first. Register it on one page, or on the browser to cover every page including popups opened later; each click is reported as a context event. ### Frames - **One page, frames included** — a selector is looked for in the main document and every iframe, same-origin or cross-origin, at any depth: no per-frame sessions, no frame handles, no depth limit. `In` confines a call to an iframe, a frame named by URL or name, a dialog or a component with a shadow tree, nested as deep as the page is. A frame created mid-wait is covered the moment it exists, and every result names the frame it found its element in plus a reference the next action takes as it is — one that goes stale after a navigation instead of pointing at something else. ### Scripts beside the browser (BrowserVM, early access) - **`RunScript`** runs JavaScript in its own isolate next to the page, reaching the document through the engine: a cross-origin `