0

I have a div scroll bar , i need to scroll down at the end of my Div container. The elements are visible in the html page only when i scroll down.

I have tried below approaches, this fails with cannot interact with Element.

scrollArea.sendKeys(Keys.ARROW_DOWN);

The below approach scrolls down but it again goes up.

dragger.moveToElement(webelement).clickAndHold().moveByOffset(0, numberOfPixelsToDragTheScrollbarDown).release(webelement).build().perform();
  • You can do that with javascript. You can use `JavascriptExecutor` and set js code in it. here are 2 good links which should help [Scroll to bottom of div](https://stackoverflow.com/questions/270612/scroll-to-bottom-of-div) , [JavascriptExecutor use example](https://www.guru99.com/scroll-up-down-selenium-webdriver.html) – Edgar Khachatryan Feb 27 '20 at 12:11
  • It's not the webpage i am trying to scroll, its a div container embedded in a webpage – Rupesh Hotkar Feb 27 '20 at 12:24

0 Answers0