Reputation: 303
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
How long did the driver wait for this condition to be true?
Upvotes: 1
Views: 162
Reputation: 11619
Try this
WebDriverWait wait = new WebDriverWait(driver, 10);
long startTime = System.currentTimeMillis();
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
long durationMs = System.currentTimeMillis() - startTime;
Upvotes: 1