Scrolling a webpage is required in the automation when the application requires scrolling down or up to display additional information e.g. most of the e-commerce sites display only 10-20 products at a time and then load more products as the user scrolls down. In this tutorial, we’ll take an example of an e-commerce website – Flipkart and automate the scrolling in Selenium in order to fetch more results.
The following test script automates Flipkart’s scroll down functionality to test the display of new pages on the search result page as the user scrolls down.
That’s all we have in this post, please comment below if you have any questions. Check our complete step-step selenium tutorial here
Kuldeep is the founder and lead author of ArtOfTesting. He is skilled in test automation, performance testing, big data, and CI-CD. He brings his decade of experience to his current role where he is dedicated to educating the QA professionals. You can connect with him on LinkedIn.