diff --git a/manual/src/test/java/GroupingInteractionsDocTest.java b/manual/src/test/java/GroupingInteractionsDocTest.java index 7adc1b8d..6a0a8b94 100644 --- a/manual/src/test/java/GroupingInteractionsDocTest.java +++ b/manual/src/test/java/GroupingInteractionsDocTest.java @@ -62,7 +62,8 @@ void act1() throws IOException, InterruptedException { assumeThat(new ProcessBuilder("which", "google-chrome").start().waitFor()).isEqualTo(0); final var browseTheWeb = new BrowseTheWeb( - new LocalWebDriverSupplier(BrowserType.CHROME, new ChromeOptions().setHeadless(true))); + new LocalWebDriverSupplier( + BrowserType.CHROME, new ChromeOptions().addArguments("--headless"))); // tag::create-actor[] var john = new Actor("John").can(browseTheWeb); // end::create-actor[] diff --git a/manual/src/test/java/SeleniumDocTest.java b/manual/src/test/java/SeleniumDocTest.java index 1ae378b0..f826334f 100644 --- a/manual/src/test/java/SeleniumDocTest.java +++ b/manual/src/test/java/SeleniumDocTest.java @@ -47,7 +47,7 @@ void act2() throws IOException, InterruptedException { .can( new BrowseTheWeb( new LocalWebDriverSupplier( - BrowserType.CHROME, new ChromeOptions().setHeadless(true)))); + BrowserType.CHROME, new ChromeOptions().addArguments("--headless")))); // end::additional-capabilities[] var latestRelease = cameron.checks(new LatestShakespeareReleaseVersion()); diff --git a/modules/selenium/build.gradle.kts b/modules/selenium/build.gradle.kts index d58c3758..619f0404 100644 --- a/modules/selenium/build.gradle.kts +++ b/modules/selenium/build.gradle.kts @@ -10,7 +10,7 @@ repositories { mavenCentral() } dependencies { api(project(":modules:core")) - api("org.seleniumhq.selenium:selenium-java:4.12.1") + api("org.seleniumhq.selenium:selenium-java:4.16.1") api("io.github.bonigarcia:webdrivermanager:5.6.2") implementation("commons-io:commons-io:2.15.1") diff --git a/modules/selenium/src/test/java/org/shakespeareframework/selenium/LocalWebDriverSupplierTest.java b/modules/selenium/src/test/java/org/shakespeareframework/selenium/LocalWebDriverSupplierTest.java index aa57836d..10ce1551 100644 --- a/modules/selenium/src/test/java/org/shakespeareframework/selenium/LocalWebDriverSupplierTest.java +++ b/modules/selenium/src/test/java/org/shakespeareframework/selenium/LocalWebDriverSupplierTest.java @@ -25,8 +25,8 @@ class LocalWebDriverSupplierTest { private static final Map HEADLESS = Map.of( - CHROME, new ChromeOptions().setHeadless(true), - FIREFOX, new FirefoxOptions().setHeadless(true)); + CHROME, new ChromeOptions().addArguments("--headless"), + FIREFOX, new FirefoxOptions().addArguments("-headless")); @ParameterizedTest(name = "get returns a {0}") @EnumSource(BrowserType.class)