diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java index 4b3d2b0f1a..484072c3e7 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java @@ -40,11 +40,11 @@ public class LoginActions extends AuthRealm { @FindBy(css = "div[id='kc-form-options'] span a") private WebElement backToLoginForm; - @FindBy(xpath = "//span[@class='kc-feedback-text' and text()]") + @FindBy(xpath = "//span[@class='kc-feedback-text' and string-length(text())>1]") private WebElement feedbackText; public String getFeedbackText() { - waitUntilElement(feedbackText, "Feedback message should be present").is().present(); + waitUntilElement(feedbackText, "Feedback message should be present").is().visible(); return feedbackText.getText(); } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java index c731ca17b4..a49d823202 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java @@ -72,7 +72,7 @@ public class RegistrationTest extends AbstractAccountManagementTest { public void assertMessageAttributeMissing(String attributeName) { String feedbackTest = testRealmRegistrationPage.getFeedbackText(); String contains = "Please specify " + attributeName + "."; - assertTrue("'" + contains + "' doesn't contain '" + feedbackTest + "'", feedbackTest.contains(contains)); + assertTrue("'" + feedbackTest + "' doesn't contain '" + contains + "'", feedbackTest.contains(contains)); } @Test