code: public void alertEquals(double seconds, String expectedAlertText) {
          try {
              double timeTook = popup(seconds);
              timeTook = popupEquals(seconds - timeTook, expectedAlertText);
              checkAlertEquals(expectedAlertText, seconds, timeTook);
          } catch (TimeoutException e) {
              checkAlertEquals(expectedAlertText, seconds, seconds);
          }
      }
docs: Waits up to the provided wait time for an alert present on the page has content equal to the
  expected text. This information will be logged and recorded, with a
  screenshot for traceability and added debugging support.
  
  @param expectedAlertText the expected text of the alert
  @param seconds           the number of seconds to wait