WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
驾驶员等待此条件多长时间?
最佳答案
尝试这个
WebDriverWait wait = new WebDriverWait(driver, 10);
long startTime = System.currentTimeMillis();
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
long durationMs = System.currentTimeMillis() - startTime;