1var divElement = document.getElementById("div");
2divElement.scroll({
3 top: divElement.scrollHeight,//scroll to the bottom of the element
4 behavior: 'smooth' //auto, smooth, initial, inherit
5});
11- Actions moveToElement method to
2scroll down to specific web elements.
3
4Do you know any other way to scroll?
5 2- We can use JSExecutor.executescript
6 method to scrool up and down, or left and right.
7
8 JSExecutor --> executeScript --> scrollBy(0,250);
9 JSExecutor --> executeScript --> scrollIntoView(true),
10 WebElementWeWantToScroll;
11