Skip to content

Conversation

@aslushnikov
Copy link
Contributor

Fixes #1860

@JoelEinbinder
Copy link
Contributor

How does this sound?

This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will indirectly cause the page to navigate. Consider this example:

const navigationPromise = page.waitForNavigation();
await page.click('a.my-link'); // Clicking the link will indirectly cause a navigation
await navigationPromise; // The navigationPromise resolves after navigation has finished 

NOTE Usage of the History API to change the URL is considered a navigation.

@aslushnikov aslushnikov force-pushed the docs-wait-for-navigation branch from 9389561 to 05610c3 Compare April 26, 2018 00:51
@aslushnikov
Copy link
Contributor Author

@JoelEinbinder can you please take a look?

@aslushnikov aslushnikov merged commit f797f8c into puppeteer:master Apr 26, 2018
@aslushnikov aslushnikov deleted the docs-wait-for-navigation branch May 9, 2018 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants