When i try to open any site using selenide with chrome version newer than 114 i get an error:
HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_119 2023-12-02T15:58:16.710+04:00 WARN 47209 --- [ scheduling-1] i.g.b.wdm.versions.VersionDetector : Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_119 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_119)
This problem is solved in selenium 4.6.x but even the newest version of selenide 7.0.3 uses selenium 4.15 which still has this problem. this is due to google changes:
Current Releases If you are using Chrome version 115 or newer, please consult the Chrome for Testing availability dashboard. This page provides convenient JSON endpoints for specific ChromeDriver version downloading.
This is how I solved the problem... part of pom.xml:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.8.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>7.0.3</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide-core</artifactId>
<version>7.0.3</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.5.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
</dependency>
My config bean for create instance of WebDriver:
@Component
public class DriverConfig {
private WebDriver driver;
public WebDriver getDriver() {
if (Objects.isNull(driver)) {
ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--remote-allow-origins=*");
options.setHeadless(true);
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver(options);
}
return driver;
}
}
Setup this webDriver:
WebDriverRunner.setWebDriver(driverConfig.getDriver());
it doesn't seem like the right decision to me. I would be glad if someone could suggest a better solution to the problem. and I hope that selenide authors will release a fix for such cases. thank you all in advance for your answers!