NOt Scrolling down | Selenium Forum
M
Posted on 02/02/2016
Though my below runs without errors and also printing the statement, but not scroilling down the scroll bar.
FYI- using selinnium 2.49 jar
*******************************
public static void main(String[] args) {
// TODO Auto-generated method stub

WebDriver webdriver = new FirefoxDriver();
webdriver.get("http://google.com");
WebElement we = webdriver.findElement(By.name("q"));
we.sendKeys("java ");
we.submit();

JavascriptExecutor jse = (JavascriptExecutor)webdriver;
jse.executeScript("window.scrollBy(0,250)", "");

System.out.println("Page Scrolled down...Complete");

}

M
Replied on 02/02/2016

try this

jse.executeScript("scroll(0, 250);");