Blog

WebDriver - wait for element using Java

In order to explicitly wait until an element is visible or clickable, the most direct and simple way is to use a WebDriverWait object in conjunction with ExpectedConditions. The following script shows this.

WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[strong[.='English']]")));

Pages