Fix PasswordPolicyTest
(cherry picked from commit 87b125e)
This commit is contained in:
parent
817127a751
commit
c51d5e9820
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue