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? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

c# - Get the Class name in a class with atribute inside a attribute method -