Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scroll page with selenium

I am using FirefoxDriver webdriver. The page that loads in Firefox window is a large page and I want to scroll that page using selenium.

I want to know how this can be done.

like image 275
Sandeep Kumar Avatar asked Dec 08 '11 15:12

Sandeep Kumar


1 Answers

I think you should do something like

driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")

Good Luck.

like image 65
Ayyoub Avatar answered Oct 18 '22 03:10

Ayyoub