code: public void acceptAlert() {
          String action = "Clicking 'OK' on an alert";
          String expected = "Alert is present to be clicked";
          // wait for element to be present
          if (!is.alertPresent()) {
              waitFor.alertPresent();
          }
          if (!is.alertPresent()) {
              reporter.fail(action, expected, "Unable to click alert as it is not present");
              return; // indicates element not present
          }
          accept(action, expected, "alert");
      }
docs: Accept (click 'OK' on) an alert box