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.

[REGRESSION]: Can no longer click Material UI select box

See original GitHub issue

Context:

  • GOOD Playwright Version: 1.16.2
  • BAD Playwright Version: 1.17.0
  • Operating System: Mac and Linux

Code Snippet

  test('can work with material UI select list', async ({ page }) => {
    await page.goto('https://mui.com/components/selects/')
    await page.click('#demo-simple-select')
    await page.click('li[data-value="30"]')
  })

shows errors now:

Timeout of 30000ms exceeded.
Pending operations:
  - page.click at scenarios/alltests.spec.ts:79:16

page.click: Target closed
=========================== logs ===========================
waiting for selector "#demo-simple-select"
  selector resolved to visible <div tabindex="0" role="button" aria-expanded="false"…>…</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
  <li tabindex="-1" role="option" data-value="30" aria…>…</li> from <div id="menu-" role="presentation" class="MuiModal-r…>…</div> subtree intercepts pointer events

Describe the bug

This was working in playwright 1.16.x

Also, for some reason the HTML report locally doesn’t show images or trace any more

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
denny99commented, Dec 1, 2021

There is definitely a new behaviour in playwright 1.17.0.

In my case, i have a toast message above a button. And when executing the click playwright does the following

    retrying click action, attempt #57
      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

The problem is, playwright thinks that the element is visible and moves the mouse to the button. Our toasts are automatically closed BUT when hovering them with the mouse, this mechanism is paused until the mouse leaves the toast. So the toast never disappears und our test fails.

When reverting back to 1.16.3 it is working again. The behaviour in 1.16.3 is:

      waiting for element to be visible, enabled and stable
      element is visible, enabled and stable
      scrolling into view if needed  --> here it is waiting until the toast disappears
      done scrolling --> only emitted when toast is gone
      performing click action

So there must be a change in the scrolling into view if needed step. 1.17.0 doesn’t wait here and immediately tries to press the button

0reactions
dgozmancommented, Dec 1, 2021

Thank you, this will be fixed in v1.17.1 by #10653.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set Select component in Material-UI to loose its focus ...
After selecting an item, Menu list will be close immediately and Select component loses its focus state with borderBottom become 1px solid and ......
Read more >
React Select component - Material UI - MUI
Select components are used for collecting user provided information from a list of options.
Read more >
LAWATS.pdf
Before You Begin. Manual entry of more than 99 employees is not allowed. . 1. Go to www.laworks.net. 2. Click “File Wages &...
Read more >
WebDriverIO Tutorial For Handling Dropdown In Selenium
You can select the dropdown in value by providing the index of the value. The index is nothing but the position of the...
Read more >
Task recorder resources - Finance & Operations | Dynamics 365
However, users can no longer produce business process diagrams from recordings. Task recorder can automatically generate application regression ...
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