//This will scroll the page till the element is found js.executeScript("arguments[0].scrollIntoView();", Element); } } Script Description:In the above code, we first launch the given url in Chrome browser. Next, scroll the page until the mentioned element is visible on the current page....
//This will scroll the page till the element is found js.executeScript("arguments[0].scrollIntoView();", Element); } } Script Description:In the above code, we first launch the given url in Chrome browser. Next, scroll the page until the mentioned element is visible on the current page....
Selenium usually does it before performing any action. However that in a non-deterministic way to scroll, in the sense that you have to perform an action to scroll the element to view. This way will suffice most of the time, still, we can understand how to make use of javascript to per...