@Then("^I should see \"([^\"]*)\" in the progrexion confirmation form the sticky header uncheck$") public void isTextPresentIsProfrexionUncheckForm(String Message) throws Throwable { Thread.sleep(3000); try { Assert.assertTrue( "Message did not match anything in the form", detailPage.StickyForRentProgressionConfirmationText().contains(Message)); System.out.println(Message + " - passed"); } catch (AssertionError e) { System.out.println(Message + " - failed"); throw e; } }