I am still facing the same issue, here is my code:
synchronized (driver)
{
driver.wait(2000);
}
try {
new WebDriverWait(driver, 50).until(ExpectedConditions
.elementToBeClickable(By.xpath("//html/body/div[2]/div/form/div[6]/div/div/div/button")));
} catch (StaleElementReferenceException e) {
e.printStackTrace();
}
//Click on Weight Graph "Cancel" button
WebElement element11 = driver.findElement(By.xpath("//html/body/div[2]/div/form/div[6]/div/div/div/button"));
Actions actions1 = new Actions(driver);
actions1.moveToElement(element11).click();
-Sum