waitForPopup
Wait for a popup to appear without switching to it. Code continues on the current tab.
Signature
const page = await utils.waitForPopup(options?)Parameters
| Param | Type | Default | Description |
|---|---|---|---|
options.matcher | string | RegExp | — | Match the popup’s title or URL |
options.timeout | number | 8000 | Max wait time (ms) |
Examples
await utils.click("#connect-wallet");
const popup = await utils.waitForPopup({ matcher: "MetaMask" });
// Still on the original page — popup is just a referenceError Handling
Throws if no matching popup appears within the timeout.
Last updated on