Get scrollheight cross-browser through Selenium

Posted by hh354 on Stack Overflow See other posts from Stack Overflow or by hh354
Published on 2010-05-04T17:15:16Z Indexed on 2010/05/04 17:18 UTC
Read the original article Hit count: 256

Filed under:
|
|
|

Hi, I'm working on a project which is using Selenium and I'd like to try to get the full web page height cross-browser and cross-platform. IE8 is being stubborn as always, is there anybody who has an idea of how to solve this?

The problem: When you scroll down a page for e.g. 500px and you keep doing this until the bottom of the page, the last scroll will be less than 500px. I need to know how much this last scroll was.

Two ways of solving: 1) Find the offset that has been scrolled each time (works everywhere except IE8) 2) Find the total height of the webpage

I know JQuery's height() function does this but I can't use this function from Selenium RC. If you know a way of calling JQuery functions through Selenium or any other solution, please tell!

Cheers, Henry

© Stack Overflow or respective owner

Related posts about selenium

Related posts about JavaScript