Closed vkudley closed 8 months ago
Playwright allows scrolling element into view only if it has a layout object (display is not none). When element has display: none, browser does not know where to scroll to. We need to update our docs and require visibility on scrolling to avoid this ambiguity.
Thanks for the prompt and actionable reply! There is no explicit Displayed column in actionability table and I confused it with Visible. Actual problem was with Locator pointing at the match in a wrong section of the DOM while I was looking at the "correct" one.
Version
1.41.2
Steps to reproduce
Dotnet code, explicit use:
await element.ScrollIntoViewIfNeededAsync();
Expected behavior
I expect an element to be scrolled into a view to become Visible after checking that it is Stable
Actual behavior
Call log:
Additional context
According to https://playwright.dev/dotnet/docs/actionability this method should only check for Stable and ignore Visible, which makes sense for elements that need to be scrolled into view. Somehow it makes unnecessary check for Visible and times out
Environment