# explicitly wait
WebDriverWait wait;
wait = new WebDriverWait(driver, 10);
# define condition for wait - example: textToBe and className
wait.until(ExpectedConditions.textToBe(By.className()), "");
# sleep - will have to throw exception
Thread.sleep(1000);
# implictly wait
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);