I have a use case wherein there's a div element on the webpage, it appears like a popup dialog as soon as you click a link (its not an actual popup, its something like dialog boxes which opens in Facebook when you click a link to check reactions on your posts etc.)
I'm using Selenium WebDriver with Java to automate tests for this application, my use case involves me to scroll to the bottom of the dialog box where there is a link to show more items, when user clicks show more, it populates another 10 items in the list and so on until there are no other items left for the user to visit.
So basically I have to scroll down on that particular div element till I keep seeing Show More
link and when driver is not able to find show more link it should stop.
Note - I can't just scroll to bottom of the page using javascript window.scrollTo()
as it will scroll down through whole webpage, however I just want to scroll to bottom of that division element only.
If anybody have any idea on how to achieve this please let me know.
Thanks for the help in advance !