mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-10-31 16:01:00 +01:00
Use new headless setup method
This commit is contained in:
parent
39265157fd
commit
2e98f12f0c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user