No matter how many javscript executor lines I use or how many times I change the scrolling positions to different numbers, Selenium WebDriver 3 always takes me to the same place on the list that is doing parallax scrolling.

It scrolls to row 70 of the list but I want to go to row 65. I tried various ways, but it does not work. This same code was working with selenium webdriver 2 before. The element is hidden until you scroll to it through the list so I can't use scroll into view.

Can someone please advise how I can scroll to the element so I can click on it? Thanks.


 I also tried this and it didn't work either.
 javascript.executeScript("window.scrollBy(0,600)", "");
  • Possible there are scroll bar which is not browser default scroll bar.Please share scroll area screenshot and code so we can get more idea.
    – Sagar007
    Commented Feb 22, 2017 at 4:58
  • Use possible answers from this question; How to Scroll web page in Selenium. sqa.stackexchange.com/questions/18796/…
    – Bharat Mane
    Commented Mar 24, 2017 at 5:13

1 Answer 1


Try this to scroll to the element.

JavascriptExecutor jse = (JavascriptExecutor)driver;

WebElement element = driver.findElement(By.id(id_name));

jse.executeScript("arguments[0].scrollIntoView(true);", element);

Not the answer you're looking for? Browse other questions tagged or ask your own question.