--To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/eb2395a5-a4c3-4a81-abb9-74e2b0018688%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
Thread.sleep(20000);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("resultsTwoColumn")));
Hi Yevgen,implicit wait and thread.sleep are not same.
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); --- Maximum wait is 20 sec if element found before 20 sec, it will proceed further. Most appreciate method and browsers maximum load will be 30 sec. You can keep 30 sec maxi for your project.Thread.sleep(20000); --- It will wait for 20 sec even if the element is present before that or element is not present. fixed timings.
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("resultsTwoColumn"))); --- I have no idea about this.
WebDriver wd = new FirefoxDriver();
wd.get("http://www.orbitz.com");
wd.findElement(By.name("search")).click();
WebDriverWait wait = new WebDriverWait(wd, 60);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("resultsTwoColumn"))); //check every 60 seconds till id=resultsTwoColumn is available.