使用如下代码,将页面滚动到最底部

    @Test(enabled = true)
    public void scroll(){
        String jsStr="window.scrollTo(0,document.body.scrollHeight)";
        ((JavascriptExecutor) jsDriver).executeScript(jsStr);
        takescreenshot();
    }

 

相关文章: