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