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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Proper support for scrolling to the bottom of a page #30643
Comments
This feature is also discussed in #1115 - however the issue was closed because mouse wheel interaction was implemented, but that doesn't solve the infinite scroll scenario. Should this feature request be raised in https://github.com/microsoft/playwright rather than the Python specific repository? |
@SamStephens This feature is not that straightforward. It's impossible to scroll to the bottom of an "infinite list" pattern. On many pages, instead of scrolling the document, you have to scroll some particular scrollable container inside. On other pages, you have to scroll an iframe instead. There are probably many more edge cases. Given the limitations, we recommend:
Let me know whether the above methods work for you. |
I'm currently using I guess my thinking is why not wrap up |
Introducing an API requires a certain quality of the implementation. Due to the limitations I listed, we are not confident that we can implement such an API in a robust manner, unless it's called |
@dgozman that's fair. I wonder if it's worth putting a little something in the documentation about scrolling practices, to pre-empt people with similar questions and problems to me. If not, I'm happy to close this issue; thanks for your explanations. |
Thanks for doing that @dgozman, I'm guessing you don't want to explicitly document |
Yep, we think that other methods are better and easier to explain. |
馃殌 Feature Request
I'd like a simple method to allow me to scroll my browser page to the bottom. Something like
Or maybe
Where the possible answers are top and bottom.
Example
No response
Motivation
The motivation here is that scrolling to the bottom of a page is a common way to trigger infinite scrolling pages to load more content.
It's easy to search and find people working around the lack of this feature via Javascript. In fact, a Playwright developer suggests using Javascript in microsoft/playwright-python#683
However, I'd argue that infinite scrolling pages are common enough that this is a worthwhile feature to add to Playwright.
The text was updated successfully, but these errors were encountered: