question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Do not require waiting for navigation upon click

See original GitHub issue

The following pattern needs to go before we hit v1.0

const [response] = await Promise.all([
  page.waitForNavigation(waitOptions),
  page.click(selector, clickOptions),
]);

it should be simply

await page.click(selector, clickOptions);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
pavelfeldmancommented, Mar 7, 2020

This is now done, with waitUntil as @jperl was suggesting. I also pulled press into page.press() for convenience.

0reactions
thernstigcommented, Apr 3, 2020

And another question. page.waitForNavigation() waits for the load event whereas for page.click() you chose the event waitForNavigation - was there a reason? Reason I am asking is that in my case I could not replace the original post 1-to-1 with the new implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer wait page load after form submit - Stack Overflow
You can wait for navigation asynchronously to avoid getting null on redirection, await Promise.all([ page.click('button[type=submit]'), ...
Read more >
Navigating & waiting - Checkly
In your scripts you can click on a link that triggers a navigation to a new page. You can use Puppeteer's page.waitForNavigation() method...
Read more >
Avoiding hard waits in Playwright and Puppeteer
An auto-wait system failing once is no good reason for ditching the approach completely and adding explicit waits before every page load and ......
Read more >
The 3-Click Rule for Navigation Is False
The 3-click rule is a persistent, unofficial heuristic that says that no page should take more than 3 clicks (or taps on a...
Read more >
Browser automation actions reference - Power Automate
A physical click is required for cases where emulated clicks don't perform the intentional action on the element. As this option requires the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found