Selenium: Different Wait Examples


ExplicitWait
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("button[type='submit']")));

ImplicitWait
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);