コード例 #1
0
 @Override
 public boolean isAlertPresent() {
   try {
     session.driver().switchTo().alert();
     return true;
   } catch (NoAlertPresentException Ex) {
     return false;
   }
 }
コード例 #2
0
 @Override
 public boolean lookForSomeText(String someText) {
   return session.driver().getPageSource().contains(someText);
 }