Scroll To Specific Element Selenium Webdriver Java
I'm using Selenium with Java and ChromeDriver to run few scripts on a website. I want to scroll the driver or the page to an specific element located on the page. It might be visib
Solution 1:
If you want to scroll to specific element, you should try using scrollIntoView(true)
as below :-
//Find that specific element first
WebElement element = driver.findElement(..);
//Now scroll to this element
jse.executeScript("arguments[0].scrollIntoView(true);", element);
Post a Comment for "Scroll To Specific Element Selenium Webdriver Java"