Fix LoginActions.feedbackText selector

(cherry picked from commit d05f809)
This commit is contained in:
Vaclav Muzikar 2016-02-08 15:32:32 +01:00
parent ec2cfba670
commit b5660cbbab
2 changed files with 3 additions and 3 deletions

View file

@ -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();
}

View file

@ -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