wait_for_page
Pause until a page's URL or title matches given conditions, useful after logins, redirects, or route changes. Returns the final URL and title.
Instructions
Wait until the current page's URL or title meets a condition: URL contains text, URL matches a regular expression, and/or title contains text (all given conditions must hold). Use after an action that navigates or redirects (submitting a login form, clicking a link, a single-page-app route change) before checking the new page. Returns the final URL and title; on timeout, the error shows the URL and title the page actually had. To wait for an element to appear, use wait_for_element instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeoutMs | No | How long to wait, in milliseconds (default 10000, max 60000). | |
| urlMatches | No | Wait until the URL matches this JavaScript regular expression, e.g. '/orders/[0-9]+$'. | |
| urlContains | No | Wait until the URL contains this text, e.g. '/dashboard' or 'checkout-step-two'. | |
| titleContains | No | Wait until the page title contains this text (case-sensitive), e.g. 'Dashboard'. |