Selenium - Scroll down a growing page

后端 未结 4 1738
礼貌的吻别
礼貌的吻别 2020-12-10 14:42

I\'m using Selenium with c#.

Selenium usually can automatically scroll down to the bottom of a web page to find elements but I having issues with a certain page whi

4条回答
  •  天命终不由人
    2020-12-10 15:17

    Try using javascript as described in this question

    IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
    js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight);");
    

提交回复
热议问题