code: private void accept(String action, String expected, String popup) {
          try {
              Alert alert = driver.switchTo().alert();
              alert.accept();
          } catch (Exception e) {
              reporter.fail(action, expected, "Unable to click 'OK' on the " + popup + ". " + e.getMessage());
              log.warn(e);
              return;
          }
          reporter.pass(action, expected, "Clicked 'OK' on the " + popup);
      }
docs: Accept (click 'OK' on) whatever popup is present on the page
  
  @param action   - the action occurring
  @param expected - the expected result
  @param popup    - the element we are interacting with