Advertisement
Guest User

test

a guest
Jan 26th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1.     @Report("Check whether the assignment exit warning is displayed")
  2.     public P checkAssignmentExitWarningMessageIsShown(boolean isWarningMessageDisplayed) {
  3.         try {
  4.             Alert alert = getDriver().switchTo().alert();
  5.             String alertText = alert.getText();
  6.             assertTrue(isWarningMessageDisplayed ? alertText != null : alertText == null, "Assignment Exit Alert Message is Shown: " + isWarningMessageDisplayed);
  7.         } catch (NoAlertPresentException ignored) {
  8.         }
  9.         return (P) this;
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement