diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 5cab074362981..6c13b163457d9 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -115,10 +115,14 @@ jobs: java-version: '11' - name: Setup Chrome and chromedriver uses: ./.github/actions/setup-chrome + - name: Start XVFB + run: Xvfb :99 & - name: Run browser tests in Chrome uses: ./.github/actions/bazel-test with: query: attr(tags, chrome, tests(//java/client/...)) except attr(tags, remote, tests(//java/client/...)) + env: + DISPLAY: :99 firefox_tests: needs: small_tests @@ -144,10 +148,14 @@ jobs: java-version: '11' - name: Setup Firefox and geckodriver uses: ./.github/actions/setup-firefox + - name: Start XVFB + run: Xvfb :99 & - name: Run browser tests in Firefox uses: ./.github/actions/bazel-test with: query: attr(tags, firefox, tests(//java/client/...)) except attr(tags, remote, tests(//java/client/...)) + env: + DISPLAY: :99 server_tests: @@ -176,9 +184,11 @@ jobs: uses: ./.github/actions/setup-chrome - name: Setup Firefox and geckodriver uses: ./.github/actions/setup-firefox + - name: Start XVFB + run: Xvfb :99 & - name: Run server tests - env: - MOZ_HEADLESS: 1 uses: ./.github/actions/bazel-test with: query: tests(//java/server/...) except attr(tags, 'lint|ie|edge|edgehtml|safari', tests(//java/server/...)) + env: + DISPLAY: :99 diff --git a/java/client/test/org/openqa/selenium/WindowTest.java b/java/client/test/org/openqa/selenium/WindowTest.java index c8ddf226d0ccc..01450b7b918a3 100644 --- a/java/client/test/org/openqa/selenium/WindowTest.java +++ b/java/client/test/org/openqa/selenium/WindowTest.java @@ -119,7 +119,7 @@ public void testSetsThePositionOfTheCurrentWindow() { } @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(EDGE) public void testCanMaximizeTheWindow() { // Browser window cannot be resized or moved on ANDROID (and most mobile platforms @@ -132,7 +132,7 @@ public void testCanMaximizeTheWindow() { @SwitchToTopAfterTest @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(EDGE) public void testCanMaximizeTheWindowFromFrame() { // Browser window cannot be resized or moved on ANDROID (and most mobile platforms @@ -148,7 +148,7 @@ public void testCanMaximizeTheWindowFromFrame() { @SwitchToTopAfterTest @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(EDGE) public void testCanMaximizeTheWindowFromIframe() { // Browser window cannot be resized or moved on ANDROID (and most mobile platforms @@ -175,7 +175,7 @@ public void canMinimizeTheWindow() { } @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(SAFARI) @Ignore(EDGE) public void canFullscreenTheWindow() { @@ -189,7 +189,7 @@ public void canFullscreenTheWindow() { @SwitchToTopAfterTest @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(SAFARI) @Ignore(EDGE) public void canFullscreenTheWindowFromFrame() { @@ -206,7 +206,7 @@ public void canFullscreenTheWindowFromFrame() { @SwitchToTopAfterTest @Test - @Ignore(value = CHROME, travis = true, gitHubActions = true) + @Ignore(value = CHROME, travis = true) @Ignore(SAFARI) @Ignore(EDGE) public void canFullscreenTheWindowFromIframe() { diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java index 17835a1e58478..d9b6c91054bac 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java @@ -65,9 +65,6 @@ private static ChromeDriverService getService() { private static ChromeOptions chromeWithCustomCapabilities(Capabilities originalCapabilities) { ChromeOptions options = new ChromeOptions(); - if (Boolean.parseBoolean(System.getenv("GITHUB_ACTIONS"))) { - options.setHeadless(true); - } options.addArguments("disable-extensions", "disable-infobars", "disable-breakpad", "disable-dev-shm-usage", "no-sandbox"); Map prefs = new HashMap<>(); prefs.put("exit_type", "None"); diff --git a/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java b/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java index 68e0c8c44a92a..bda8d44fd19bf 100644 --- a/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java +++ b/java/client/test/org/openqa/selenium/testing/drivers/WebDriverBuilder.java @@ -66,9 +66,7 @@ static void addShutdownAction(Runnable action) { .setLegacy(true) .setHeadless(Boolean.parseBoolean(System.getProperty("webdriver.firefox.headless", "false")))) .put(Browser.MARIONETTE, original -> new FirefoxOptions(original) - .setHeadless( - Boolean.parseBoolean(System.getProperty("webdriver.firefox.headless", "false")) || - Boolean.parseBoolean(System.getenv("GITHUB_ACTIONS"))) + .setHeadless(Boolean.parseBoolean(System.getProperty("webdriver.firefox.headless", "false"))) ) .put(Browser.IE, original -> { InternetExplorerOptions options = new InternetExplorerOptions(original);