Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Wait for at least one notification message
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Feb 18, 2015
1 parent 62414b6 commit a46fb53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functional-test/src/main/java/org/zanata/page/CorePage.java
Expand Up @@ -140,9 +140,9 @@ public List<String> expectErrors() {

public String getNotificationMessage() {
log.info("Query notification message");
List<WebElement>messages = (List<WebElement>) getExecutor()
.executeScript("return $('#messages li')");
return messages.size() > 0 ? messages.get(0).getText() : "";
WebElement message = waitForElementExists(
By.cssSelector("#messages li"));
return message.getText();
}

public boolean expectNotification(final String notification) {
Expand Down

0 comments on commit a46fb53

Please sign in to comment.