diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/LoginPage.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/LoginPage.java index 83d2056de8..6a302db8cf 100755 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/LoginPage.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/LoginPage.java @@ -19,12 +19,14 @@ package org.keycloak.testsuite.pages; import org.jboss.arquillian.test.api.ArquillianResource; import org.junit.Assert; +import org.keycloak.common.util.Retry; import org.keycloak.testsuite.util.DroneUtils; import org.keycloak.testsuite.util.OAuthClient; import org.keycloak.testsuite.util.WaitUtils; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.FindBy; import static org.keycloak.testsuite.util.UIUtils.clickLink; @@ -233,7 +235,14 @@ public class LoginPage extends LanguageComboboxAwarePage { } public void resetPassword() { - clickLink(resetPasswordLink); + // Since Chrome 128, the user can be still kept on the "Login page" after click to "Forget Password" link. Clicking the "Forget Password" link another + // time usually helps. Limit to 4 attempts for now. + Retry.execute(() -> { + clickLink(resetPasswordLink); + if (driver instanceof ChromeDriver) { + Assert.assertEquals("Forgot Your Password?", PageUtils.getPageTitle(driver)); + } + }, 4, 0); } public void setRememberMe(boolean enable) {