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 ) ; } }
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 .