Exception:
org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.111 with binary path
pom.xml
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.7.1</version>
</dependency>
Code for setting up the ChromeOptions
and finally creating the webdriver:
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox");
options.addArguments("--test-type");
options.addArguments("--start-maximized");
if (setBrowserUI().equals("yes")) {
options.addArguments("--headless");
}
options.addArguments("Browser.setDownloadBehavior", "allow");
options.addArguments("--disable-extensions");
options.addArguments("--disable-dev-shm-usage");
options.setExperimentalOption("prefs", chromePrefs);
base.driver = new ChromeDriver(options);
Project restriction prevent the upgrade of the Selenium version used. Is there any other way to solve other than updating to Selenium version 4.x ?
webdrivermanager
tov5.4.1
and see if it works. – Microscope