Page Scroll down and click web element | Selenium Forum
K
Kaushal Patel Posted on 27/08/2020

Thread.sleep(5000);

// Need to scroll down Page
JavascriptExecutor js = (JavascriptExecutor) driver;
// js.executeScript("window.scrollBy(0,1000");
WebElement addEntry = driver.findElement(By.linkText("ADD ENTRY"));
js.executeScript("arguments[0].scrollIntoView();",addEntry);
addEntry.click();
//driver.findElement(By.linkText("ADD ENTRY")).click();


A
Ashish Replied on 28/08/2020

What is the error in this?


Related Posts