Question
How can I use JavaScript to scroll the page to make an element clickable?
Asked by: USER1161
73 Viewed
73 Answers
Answer (73)
You can use JavaScript to scroll the element into view: `JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("arguments[0].scrollIntoView();", element);` This will scroll the page so that the element is visible in the viewport.