wait_for_any_of
Waits for multiple conditions simultaneously and returns the first match, enabling immediate branching when the next page could be one of several outcomes.
Instructions
Race multiple wait conditions — returns the first that matches, so the agent can branch immediately without sequential probes. Each condition is {kind: 'selector'|'text'|'url_contains'|'title_contains', value: string}. Returns the index + kind + value of the winning condition (or 'timeout' if none matched). Ideal for post-login flows where the next page could be any of several (e.g. 'Stay signed in?', 'Skip for now', or the inbox directly).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Max wait in ms | |
| conditions | Yes | Conditions to race. First match wins. |