diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index c5323500da..e8f043b7ab 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -144,11 +144,6 @@ selenium-edge-driver ${selenium.version} - - org.seleniumhq.selenium - selenium-safari-driver - ${selenium.version} - org.seleniumhq.selenium selenium-remote-driver diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/BrowserDriverUtil.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/BrowserDriverUtil.java index eae2150703..781fa48aab 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/BrowserDriverUtil.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/BrowserDriverUtil.java @@ -21,7 +21,6 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.firefox.FirefoxDriver; -import org.openqa.selenium.safari.SafariDriver; /** * Determine which WebDriver is used @@ -45,8 +44,4 @@ public class BrowserDriverUtil { public static boolean isDriverEdge(WebDriver driver) { return isDriverInstanceOf(driver, EdgeDriver.class); } - - public static boolean isDriverSafari(WebDriver driver) { - return isDriverInstanceOf(driver, SafariDriver.class); - } } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/UIUtils.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/UIUtils.java index dc122b05f5..3b0aa7fb29 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/UIUtils.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/UIUtils.java @@ -11,7 +11,6 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.safari.SafariDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Select; import org.openqa.selenium.support.ui.WebDriverWait; @@ -74,13 +73,7 @@ public final class UIUtils { waitUntilElement(element).is().clickable(); - if (driver instanceof SafariDriver && !element.isDisplayed()) { // Safari sometimes thinks an element is not visible - // even though it is. In this case we just move the cursor and click. - performOperationWithPageReload(() -> new Actions(driver).click(element).perform()); - } - else { - performOperationWithPageReload(element::click); - } + performOperationWithPageReload(element::click); } /** @@ -153,15 +146,6 @@ public final class UIUtils { */ public static String getTextFromElement(WebElement element) { String text = element.getText(); - if (getCurrentDriver() instanceof SafariDriver) { - try { - // Safari on macOS doesn't comply with WebDriver specs yet again - getText() retrieves hidden text by CSS. - text = element.findElement(By.xpath("./span[not(contains(@class,'ng-hide'))]")).getText(); - } catch (NoSuchElementException e) { - // no op - } - return text.trim(); // Safari on macOS sometimes for no obvious reason surrounds the text with spaces - } return text; }