Use clickLink for logout in webauthn
Closes #32923 Closes #32606 Closes #32605 Closes #32503 Signed-off-by: rmartinc <rmartinc@redhat.com>
This commit is contained in:
parent
51fd133f05
commit
456878bb00
2 changed files with 6 additions and 4 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.keycloak.testsuite.pages;
|
||||
|
||||
import org.keycloak.testsuite.util.UIUtils;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
@ -50,14 +51,14 @@ public class LogoutConfirmPage extends LanguageComboboxAwarePage {
|
|||
}
|
||||
|
||||
public void confirmLogout() {
|
||||
confirmLogoutButton.click();
|
||||
UIUtils.clickLink(confirmLogoutButton);
|
||||
}
|
||||
|
||||
public void confirmLogout(WebDriver driver) {
|
||||
driver.findElement(By.cssSelector("input[type=\"submit\"]")).click();
|
||||
UIUtils.clickLink(driver.findElement(By.cssSelector("input[type=\"submit\"]")));
|
||||
}
|
||||
|
||||
public void clickBackToApplicationLink() {
|
||||
backToApplicationLink.click();
|
||||
UIUtils.clickLink(backToApplicationLink);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ import java.util.Optional;
|
|||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.keycloak.testsuite.util.BrowserDriverUtil.isDriverFirefox;
|
||||
import static org.keycloak.testsuite.util.BrowserDriverUtil.isDriverInstanceOf;
|
||||
import static org.keycloak.testsuite.util.WaitUtils.waitForPageToLoad;
|
||||
|
@ -391,7 +392,7 @@ public abstract class AbstractWebAuthnVirtualTest extends AbstractTestRealmKeycl
|
|||
logoutConfirmPage.assertCurrent();
|
||||
logoutConfirmPage.confirmLogout();
|
||||
infoPage.assertCurrent();
|
||||
waitForPageToLoad();
|
||||
assertEquals("You are logged out", infoPage.getInfo());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Cannot logout user", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue