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

ios - Is 'init' forbidden as *part* of a variable name? -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -

qt - Microsoft FTP Service 451 The parameter is incorrect -