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.

[BUG] Page.click leads to 'Element has moved during the action'

See original GitHub issue

Context:

  • Playwright Version: 0.15+
  • Operating System: Docker / recommended image

Code Snippet

Still working on a small reproducible, but seems to be a bigger more rare edge case.

await page.click('.ant-picker-today-btn')

Describe the bug

In Playwright <= 0.14 the used snipped for clicking on an element has worked. In 0.15+ it leads to Element has moved during the action in around 80%+ of the cases.

Related PR: #1942 cc @dgozman

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mxschmittcommented, Apr 28, 2020

Issue could be fixed by adding a await page.waitForTimeout(100) before the actual click action. But that seems just like a workaround for me instead of fixing the actual issue.

Also wondered, why it was working in <= 0.14

0reactions
mxschmittcommented, May 14, 2020

Workaround was previously to use the text selector for that. But now its fixed, no clue which PR but its fixed now, yey.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Click() method will not always work - Stack Overflow
I ran into a similar issue. The click method worked on other pages, then didn't work at all on a particular page. A...
Read more >
161464 - Click event also triggers mousemove (even if mouse ...
Steps to reproduce the problem: 1. Create div element 2. Assign click and mousemove handlers 3. Click on div (do not move mouse)...
Read more >
Solutions to The Click Problem With Selenium & Java
Examine 7 different solutions you can use in the click problem - one of the most fundamental problems you may encounter during UI...
Read more >
click - WebdriverIO
This issues a WebDriver click command for the selected element , which generally scrolls to and then clicks the selected element when no...
Read more >
Browser automation actions reference - Power Automate
UI element, No, UI element, Select the UI element on web page to ... the time in seconds for page to load before...
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