Skip to content

Commit

Permalink
deflaking test the intermittently fails in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Oct 31, 2016
1 parent 3b7ba0e commit c95184a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,8 @@ private void runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour behaviour,
private void runScenarioWithUnhandledAlert(String expectedAlertText) {
driver2.get(pages.alertsPage);
driver2.findElement(By.id("prompt-with-default")).click();
try {
driver2.findElement(By.id("text")).getText();
} catch (UnhandledAlertException expected) {
}

new WebDriverWait(driver2, 30).until(elementTextToEqual(By.id("text"), expectedAlertText));
new WebDriverWait(driver2, 30).ignoring(UnhandledAlertException.class).until(elementTextToEqual(By.id("text"), expectedAlertText));
}

}

0 comments on commit c95184a

Please sign in to comment.