selenium定位滚动条的三种情况: 滚动条滑动到指定位置 String script = "return arguments[0].scrollIntoView();"; WebElement target = driver.findElement(By.xpath("XXX")); //第一种写法 ((JavascriptExecutor