When driver.findElement(By.id(eachtitle)).click();
is excecuted application is throwing
stale element reference: element is not attached to the page document error.
List<WebElement> visits = driver.findElements(By.xpath("//div[@class= \"scrollingbutton\"]"));
System.out.println(visits.size());
for(WebElement eachvisit : visits) {
String eachtitle = eachvisit.getAttribute("id");
driver.findElement(By.id(eachtitle)).click();
}