java web自动化js控制滚动条
1.JS滚动,将页面滚动条拖到底部
JavascriptExecutor javascriptExecutor = (JavascriptExecutor)BrowserUtil.driver;
javascriptExecutor.executeScript("window.scrollTo(0,document.body.scrollHeight)");
2.JS滚动,将页面滚动条拖到指定位置
JavascriptExecutor javascriptExecutor = (JavascriptExecutor)BrowserUtil.driver;
javascriptExecutor.executeScript("window.scrollTo(0,document.body.scrollHeight*1/3)");
https://blog.csdn.net/dawei_yang000000/article/details/105540011