java - Selenium Web Driver - How to check whether all the products in a page loads -


i trying solve issue need check whether products in web page loads completely. products load when user scroll page downwards. each time on scroll 8 products loaded.

how check in page last product loads , user not able scroll downwards?

use known solution scrolling down:

webdriver driver = new firefoxdriver(); javascriptexecutor jse = (javascriptexecutor)driver; jse.executescript("window.scrollby(0,250)", ""); 

then check 8 products after last scrolling iteration doesn't differ current iteration. pseudo-code:

products = getproducts(); jse.executescript("window.scrollby(0,250)", ""); // reasonable wait here if(getproducts() == products){     //that it. nothing scroll  

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -