Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scrolling to a specific element using JS executor
public void scrollToElement(WebElement myElement) {
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);",myElement);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment