In our application, when we try to find a element using
**Doesn't work**
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//h3[@class='... ']"))
**Doesn't work**
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//h3[@class='... ']"));
**Works**
Thread.sleep(3000);
driver.findElement(By.xpath("//h3[@class='... ']");
Element actually appears within 2 seconds.
Why WebDriverWait is not wait and find the element?
Is there a way to wait and find the element without using Thread.sleep but with Selenium wait functions.