From 2e98f12f0c60e5e9d1123ad3447c681d7abe8bcd Mon Sep 17 00:00:00 2001 From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> Date: Sat, 27 Jan 2024 09:31:03 +0200 Subject: [PATCH] Use new headless setup method --- Plan/common/src/test/java/extension/SeleniumExtension.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plan/common/src/test/java/extension/SeleniumExtension.java b/Plan/common/src/test/java/extension/SeleniumExtension.java index 35ace4992..f1c95599d 100644 --- a/Plan/common/src/test/java/extension/SeleniumExtension.java +++ b/Plan/common/src/test/java/extension/SeleniumExtension.java @@ -49,7 +49,7 @@ public class SeleniumExtension implements ParameterResolver, BeforeAllCallback, public static void waitForPageLoadForSeconds(int i, ChromeDriver driver) { Awaitility.await("waitForPageLoadForSeconds") - .atMost(5, TimeUnit.SECONDS) + .atMost(i, TimeUnit.SECONDS) .until(() -> "complete".equals(driver.executeScript("return document.readyState"))); } @@ -92,7 +92,7 @@ public class SeleniumExtension implements ParameterResolver, BeforeAllCallback, // Using environment variable assumes linux if (System.getenv(CIProperties.CHROME_DRIVER) != null) { chromeOptions.setBinary("/usr/bin/google-chrome-stable"); - chromeOptions.setHeadless(true); + chromeOptions.addArguments("--headless=new"); } return new ChromeDriver(chromeOptions);