List<WebElement> messages = waitForElementExists(By.id("messages"))
.findElements(By.tagName("li"));
return messages.size() > 0 ? messages.get(0).getText() : "";
}
public boolean expectNotification(final String notification) {
<BUG>log.info("Wait for notification {}", notification);
return waitForAMoment().until(new Function<WebDriver, Boolean>() {
@Override</BUG>
public Boolean apply(WebDriver driver) {
List<WebElement> messages = getDriver()

List<WebElement> messages = waitForElementExists(By.id("messages"))
.findElements(By.tagName("li"));
return messages.size() > 0 ? messages.get(0).getText() : "";
}
public boolean expectNotification(final String notification) {
String msg = "notification " + notification;
logWaiting(msg);
return waitForAMoment().withMessage(msg).until(
new Function<WebDriver, Boolean>() {
@Override
public Boolean apply(WebDriver driver) {
List<WebElement> messages = getDriver()
