-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] scrollIntoViewIfNeeded keeps scrolling thru table even after it scrolled until the element #27214
Comments
@InduKrish the log states that there's some element that intercepts pointer events, thus Playwright tries to scroll the element so that nothing is over it. I'd recommend checking the trace of the test and figuring out what exactly overlays the element. |
checked trace, looks like scroll bar is overlaying kebab menu, can you please advise how to wait for scrollbar to disappear? intercepts pointer events error which clicking on kebab menu - looks like scroll bar is overlaying kebab menu, want to wait for scroll bar to disappear before clicking on kebab menu, Can you please advise how to wait for the scroll bar to disappear? scroll bar dynamically appears on our UI, when user scrolls thru the page then it disappears. waiting for getByRole(‘row’).filter({ hasText: ‘LAS’ }).getByRole(‘button’, { name: ‘kebab-menu’ }) … 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
… intercepts pointer events
retrying click action, attempt #2 (edited)
|
@InduKrish So it looks like the scroll bar actually overlays the click area - so your users wouldn't be able to click the button as well. This looks like a bug on the website that should be fixed! |
Closing as part of the triage process. Please create a new issue with a detailed reproducible example if you still face the issue. |
System info
Source code
I have a table and i have to scroll to the element that matches a specific station then click on kebab menu.
I added scrollIntoViewIfNeeded() to scroll until station is visible and it scrolled ,
However although the scrolling is done and the station is visible, it continues to scroll.
After i added page.waitForTimeOut(6000) it stopped scrolling and clicked on kebab menu as expected.
I don't want to have static timeout in the test, but not sure why scrollIntoViewIfNeeded keeps scrolling even after the element become visible.
uniqueCrewBase>............... -------- ["MCO","LAS","MDW","PHX"]
without page.waitForTimeout(6000), it is unable to click.
The text was updated successfully, but these errors were encountered: