Skip to Content
Browser UtilswaitForPopup

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

ParamTypeDefaultDescription
options.matcherstring | RegExp—Match the popup’s title or URL
options.timeoutnumber8000Max 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 reference

Error Handling

Throws if no matching popup appears within the timeout.

Last updated on