javascript - How to calculate the page scroll length in web application? -


i'm doing below code scroll down in selenium webdriver.

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

in above code, (0,250)? how calculate 250 web page?

it's not clear want calculate. 250? lol, anything, page size, window size, webelement y location

page height

js.executescript("return document.body.scrollheight"); 

window height

js.executescript("return window.innerheight"); 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -