playwright: [Bug]: Click fails in 1.53 where it previously passed

Version

1.53.0

Steps to reproduce

I am not sure what is the root cause, hence I cannot make a repro (this is on private repo). However, I will try to provide maximum information.

Trying to click an element produces the following log:

Click(
page.locator('more-page').locator('yoo-mobile-tabbar-more').locator('.subheading').getByText('Campaigns')
)
waiting for locator('more-page').locator('yoo-mobile-tabbar-more').locator('.subheading').getByText('Campaigns')
locator resolved to <p>Campaigns</p>
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
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 20ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 100ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 100ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
<div class="subheading">…</div> intercepts pointer events
retrying click action
waiting 500ms
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling

however the intercepting element is in fact a parent. The locator is: page.locator('more-page').locator('yoo-mobile-tabbar-more').locator('.subheading').getByText('Campaigns') )

And the relevant DOM section is:

Image

Expected behavior

This is a regression comparing to 1.52

Actual behavior

timeout on click due to intercepted different element

Additional context

Feel free to contact me if more info is needed. You know who I am…

Environment

System:
    OS: macOS 15.5
    CPU: (16) arm64 Apple M4 Max
    Memory: 21.05 GB / 128.00 GB
  Binaries:
    Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.4.2 - ~/.nvm/versions/node/v22.16.0/bin/npm
  IDEs:
    VSCode: 1.100.3 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: 1.53.0 => 1.53.0 

Also on github actions ubuntu-latest runner

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 18 (13 by maintainers)

Most upvoted comments

This did not help. For now I managed to bypass it by changing the location from: locator(xxx).getByText(yyy) to locator(xxx, { hasText: yyy } which is probably related to how our overflow is defined. Not sure what has changed, though.

@mxschmitt @dgozman

This repo contains the reproduction of the issue, hope it helps

No, it’s a private repository, and I couldn’t create a minimal repro yet. Will share if I end up figuring out how to reproduce the bug

@mxschmitt Latest results with versions in between

Same test with --repeat-each 5:

  • 5 successful runs with 1.53.0-alpha-2025-06-01
  • 5 successful runs with 1.53.0-alpha-2025-06-02
  • 5 successful runs with 1.53.0-alpha-2025-06-03
  • 0 successful runs with 1.53.0-alpha-2025-06-04

Awesome, could you test the versions in between as well? So we know which one was the first one which is bad. This would be awesome! 🚀

@mxschmitt Yes, it is.

Same test with --repeat-each 5:

  • 5 successful runs with 1.53.0-alpha-2025-06-01
  • 0 successful runs with 1.53.0-alpha-2025-06-04