Fix PasswordPolicyTest

(cherry picked from commit 87b125e)
This commit is contained in:
Vaclav Muzikar 2015-12-10 12:02:28 +01:00
parent 817127a751
commit c51d5e9820

View file

@ -4,6 +4,7 @@ import org.keycloak.testsuite.console.page.fragment.OnOffSwitch;
import static org.keycloak.testsuite.page.Form.setInputValue;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import static org.keycloak.testsuite.util.WaitUtils.*;
/**
*
@ -25,7 +26,7 @@ public class UserCredentials extends User {
@FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='temporaryPassword']]")
private OnOffSwitch temporaryOnOffSwitch;
@FindBy(xpath = ".//button[contains(@data-ng-click, 'resetPassword')]")
@FindBy(xpath = ".//div[not(contains(@class, 'ng-hide'))]/button[contains(@data-ng-click, 'resetPassword')]")
private WebElement resetPasswordButton;
public void setNewPassword(String newPassword) {
@ -41,6 +42,7 @@ public class UserCredentials extends User {
}
public void clickResetPasswordAndConfirm() {
waitGuiForElement(resetPasswordButton);
resetPasswordButton.click();
modalDialog.ok();
}