Infinite Scroll

26 views
Skip to first unread message

Volodymyr

unread,
Oct 7, 2019, 3:26:08 AM10/7/19
to capybara-py
Hello,
I have a page which loads items while you scroll the page down, as long as there are new items coming from server.
Is there nice approach capybara-py can offer? I would really like to avoid using javascript to scroll down and wait for load.

Thank you,

Volodymyr

unread,
Oct 23, 2019, 9:38:20 AM10/23/19
to capybara-py
What worked for me is basically send page-down key to the element, which represents the infinite scroll.
Let's assume we have HTML like this

<div class="paginationScroll"infinitescroll="">
</div>

then the scrolling down works with the following code line:

.find('.paginationScroll').send_keys(Keys.PAGE_DOWN)
thanks,
Reply all
Reply to author
Forward
0 new messages