ExpectedCondition e = new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return !d.findElement(By.id("application")).isDisplayed();
}
};
@SuppressWarnings("rawtypes")
//wait 20 seconds for tests to pass...
Wait w = new WebDriverWait(driver, 20);
w.until(e);
WebElement error = driver.findElement(By.className("status-error"));
WebElement failure = driver.findElement(By.className("status-failure"));
WebElement success = driver.findElement(By.className("status-success"));