*** title: page.waitForEvent description: Wait for the next matching page event from the runtime event stream. --------------------------------------------------------------------------------- `page.waitForEvent` is a browser runtime capability in the `page` namespace. ## Availability * Runtime: `browser` * Kind: `event` * Category: `events` * Supported drivers: Playwright, Puppeteer, Stagehand ## SDK Surface * SDK path: `runtime.page.waitForEvent` * Async: Yes ## HTTP Surface * Transport: resource route * Route: `POST /workspaces/{id}/runtimes/{alias}/events/wait` * Long-running: No ## Reference Semantics * Requires refs: `page` ## Arguments | Argument | Type | Required | Description | | ----------- | -------- | -------- | ----------------------------- | | `eventName` | `string` | Yes | Event name to wait for. | | `options` | `object` | No | Optional event wait settings. | ## Result * Type: `unknown` * Description: Event payload mapped into runtime event metadata. ## Emitted Events `console`, `popup`, `download`, `dialog` ## SDK Example ```ts await runtime.page.waitForEvent('console'); ``` ## HTTP Example ```http POST /workspaces/{id}/runtimes/{alias}/events/wait ``` ## Related Capabilities * [`page.on`](../events/page-on) * [`context.waitForEvent`](../events/context-wait-for-event) ## Notes * This is an SDK convenience layer over runtime event list/wait APIs, not a standalone HTTP execute capability.