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