Implicit wait: Your telling the WebDriver the exact amount of time you want it to wait before it can expect the element to be visible after loading. After waiting for the specified time, it will try finding the element. If unfound, element not found exception will be thrown. Ex:
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Explicit wait: Your telling the WebDriver to wait untill a condition is satisfied. The condition to be verified is basically the element being finally visible on the web page. This option is exercised in cases when you do not want to wait for a long period of time like in case of implicit wait. Code:
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id(“aId”)));
Fluent wait: Your asking the WebDriver to poll the DOM every few seconds/ or set period of time to check if the element is finally visible on the page. This is more like a combination of explicit and implicit. Code:
FluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver)
.withTimeout(timeoutSeconds, TimeUnit.SECONDS)
.pollingEvery(500, TimeUnit.MILLISECONDS)
.ignoring(NoSuchElementException.class);