[page.click] Node is either not visible or not an HTMLElement
See original GitHub issueContext:
Playwright Version: 0.15.0 Operating System: Ubuntu 18.04.4
Code Snippet
(async () => {
// below lines used to create a profile with name 'add_profile_test'
await page.click('#add-profile-btn');
await page.fill('#profile input[type=text]','add_profile_test');
await page.click('#dialog-btn');
// after create it, then select it
await page.waitForSelector('text=add_profile_test', {waitFor: 'visible',});
await page.click('text=add_profile_test');
})
Describe the bug
when try to click the element (‘text=add_profile_test’), it reports ‘Node is either not visible or not an HTMLElement’.
but if I add one line page.waitFor(1000)
before await page.click('text=add_profile_test')
, then it can work, I don’t understand why. Shouldn’t waitForSelector and waitFor function work for this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Puppeteer in NodeJS reports 'Error: Node is either not visible ...
click (); // Error: Node is either not visible or not an HTMLElement })();. I'm trying to emulate the behaviour of a real...
Read more >Node is either not visible or not an HTMLElement for ... - GitHub
Node is either not visible or not an HTMLElement for page.click() in Puppeteer 1.6 # ... this part await page.click('#sign-in-btn') throws
Read more >Node is either not visible or not an HTMLElement (flaky ...
Looks like the drawer animation is still running when the attempt to click it is made (race condition). image.png (784×1 px, 71 KB)....
Read more >Resolve CloudWatch canary error "Node is either not visible ...
Resolution. When creating a CloudWatch canary, the "Node is either not visible or not an HTMLElement" error is typically caused by: Using ...
Read more >webdriverio/webdriverio - Gitter
I got the following error "Node is either not visible or not an HTMLElement. Error: Node is either not visible or not an...
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 Free
Top 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
That’s wonderful! It might be #2047 or #2020 or any other improvement 😄
The
waitForSelector
should not be needed at all since actions likepage.click()
automatically auto-wait for elements. Check this: https://github.com/microsoft/playwright/blob/master/docs/core-concepts.md#auto-waitingBut, if it is visible when doing the
page.click()
the above is indeed strange.(Hi Lei 😄)