Skip to content

Commit

Permalink
Upgrade selenium to 4.14 (#1687)
Browse files Browse the repository at this point in the history
* Update Selenium to 4.13 (#1683)

* Update Selenium to 4.13

* Use `addArguments` instead of `setHeadless`

This was instructed in deprecation notes of previous versions.

* chore: Upgrade Selenium to 4.14 (#1685)

---------

Co-authored-by: Guille <[email protected]>
Co-authored-by: Mikhail Shabarov <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2023
1 parent aec16b3 commit e523269
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<Implementation-Version>${project.version}</Implementation-Version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.12.0</selenium.version>
<selenium.version>4.14.0</selenium.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<spring.version>6.0.9</spring.version>
Expand Down
4 changes: 0 additions & 4 deletions vaadin-testbench-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-http</artifactId>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-http-jdk-client</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ static public WebDriver createDriver(
FirefoxProfile profile = new FirefoxProfile(profileDir);
options.setProfile(profile);
}
options.setHeadless(Parameters.isHeadless());
if (Parameters.isHeadless()) {
options.addArguments("-headless");
}
driver = new FirefoxDriver(options);
} else if (BrowserUtil.isChrome(desiredCapabilities)) {
// Tells chrome not to show warning
Expand All @@ -75,7 +77,10 @@ static public WebDriver createDriver(
// #14319
ChromeOptions options = new ChromeOptions();
options.addArguments("--test-type ");
options.setHeadless(Parameters.isHeadless());

if (Parameters.isHeadless()) {
options.addArguments("--headless=new");
}
driver = new ChromeDriver(options);
} else if (BrowserUtil.isSafari(desiredCapabilities)) {
driver = new SafariDriver();
Expand Down

0 comments on commit e523269

Please sign in to comment.