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 -

mongodb - Multiple $and with multiple $or in $match mongoose -

Teradata TPT_INFRA: TPT02640: Error: Conflicting column count -