Currently, I am utilizing Selenium along with Java and ChromeDriver to execute a few scripts on a website. My goal is to scroll the driver or the page to a specific element positioned on the webpage. It is important that this element is visible. I am aware that using a JavascripExecutor makes this possible, but as of now, I am only able to scroll in certain increments. Here is my current approach:
jse.executeScript("window.scrollBy(0,250)", "");