code: public void promptMatches(double seconds, String expectedPromptPattern) {
          try {
              double timeTook = popup(seconds);
              timeTook = popupMatches(seconds - timeTook, expectedPromptPattern);
              checkPromptMatches(expectedPromptPattern, seconds, timeTook);
          } catch (TimeoutException e) {
              checkPromptMatches(expectedPromptPattern, seconds, seconds);
          }
      }
docs: Waits up to the provided wait time for a prompt 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 expectedPromptPattern the expected text of the prompt
  @param seconds               the number of seconds to wait