-
-
Notifications
You must be signed in to change notification settings - Fork 207
BrowserFrame.waitForNavigation()
David Ortner edited this page Jan 12, 2024
·
1 revision
Waits for the frame to be navigated. This is resolved when the HTML of the new URL has been loaded into the frame.
This method is useful when JavaScript triggers a redirect or if you click on a link.
async waitForNavigation(): Promise<void>;
Promise<void>
// Clicks on a link
page.mainFrame.document.querySelector('a').click();
// Waits for the navigation to complete
await page.mainFrame.waitForNavigation();