How to scroll page with selenium

后端 未结 4 1952
深忆病人
深忆病人 2021-02-04 12:34

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 d

4条回答
  •  悲&欢浪女
    2021-02-04 13:03

    I think you should do something like

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

    Good Luck.

提交回复
热议问题