[BUG] Playwright 1.17.0 -> After clicking the element - I get an error that click action was failed
See original GitHub issueContext:
- Playwright Version: 1.17.0
- Operating System: Windows
- Node.js version: 14.6
- Browser: Chrome
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:
const elem = this.page.locator(element);
await elem.click({timeout: 5000})
Describe the bug
After switching to the 1.17.0 version - I sometimes get errors in the click action. In the version of 1.16.3, it works as well. Example:
I performed a click on the button:

That actually succeeded, and the test continued to the next actions:

But I get the error regarding the click action:

And the following log:
waiting for selector "[data-uitestingname="add"]>> nth=-1"
selector resolved to visible <div id="isc_JN" data-uitestingname="add" eventproxy=…>…</div>
attempting click action
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td align="left" valign="middle" class="noDataLabel">No Data...</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #1
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #2
waiting 20ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #3
waiting 100ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #4
waiting 100ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #5
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #6
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #7
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #8
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #9
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #10
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<td $9a="$9g" id="isc_VL" align="left" valign="middl…>…</td> from <div id="isc_RA" role="dialog" aria-hidden="false" cl…>…</div> subtree intercepts pointer events
retrying click action, attempt #11
waiting 500ms
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Playwright: Click button does not work reliably (flaky)
I tried to find that element in the DOM but it is not there. 5. Update. Another thing that I do not understand...
Read more >Changelog - Cypress Documentation
It now logs the yielded request/response object associated to the intercepted call when clicked, where previously it did not log these details.
Read more >playwright._impl._api_types.error: target closed - You.com
In my case the Playwright error Target closed appeared at the first attempt to retrieve a text from the page. The error is...
Read more >playwright - npm
A high-level API to automate web browsers. Latest version: 1.29.1, last published: 4 days ago. Start using playwright in your project by ......
Read more >microsoft/playwright v1.17.1 on GitHub - NewReleases.io
#10632 - [BUG] Playwright 1.17.0 -> After clicking the element - I get an error that click action was failed #10627 - [REGRESSION]:...
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
@AlexKomanov Could you please share a trace file with us? You can send it to dgozman [at] microsoft [dot] com if you’d like.
@AlexKomanov If you have upgraded to 1.17.1, you can safely remove
PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK, but it should be ignored anyway. Please let us know if something is broken.