page.click not working
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.17.0
- Platform / OS version: Ubuntu 18.04
- URLs (if applicable):
- Node.js version: v11.10.0
wait page.click(‘#link’) works most of the time. But for some mysterious reason, sometimes it is not. The worst is that the program is doing exactly the same, but just on a different page with the exactly same layout.
But await page.$eval(‘#link’, elem => elem.click()); works really well.
await page.hover('#link');
page.click(''#link'); // --> not always working
page.$eval('#link', elem => elem.click()); // --> always works
What is the expected result?
page.click(''#link')
and page.$eval('#link', elem => elem.click())
should work the same way.
It is hard for me to give you a code reproducing the issue because it is happening on an online web service needing credentials to log in.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:10
Top Results From Across the Web
7 solutions for page.click() is not working in puppeteer
1. Focus and Enter - First Focus on the element and then press enter. · 2. using $eval - you can try as...
Read more >puppeteer element.click() not working and not throwing an error
I have determined what is happening, and why I don't get an error, and how to work around the issue. The main issue...
Read more >Puppeteer Won't Click on Element · Issue #1805 - GitHub
Wondering why the plain page.click('selector') doesn't work? ... The problem noted was that simply using await page.click() was not working.
Read more >Error - Click not executed | Checkly
For example: our Playwright script is supposed to run a page.click('#btn-login') but seems to ignore the click and just proceed with the next...
Read more >Website Buttons Not Working In Browsers? Here Are 6 Fixes
1. Website buttons aren't working on Google Chrome · 1.1. Refresh the website page · 1.2. Turn on JavaScript · 1.3. Clear the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am facing the same issue 😦 dont understand why. i had to use waitforSelector with a click after.
page.$eval(cssQuery('action', 'someting'), el => el.click());
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!