I am getting this error message thrown
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
when I set the capability to download files from the grid nodes.
If I comment out options.setCapability("se:downloadsEnabled", "true") the browser launches with the session created.
if (browser.equalsIgnoreCase("chrome")) {
ChromeOptions options = new ChromeOptions();
options.setCapability("platformName", Platform.LINUX);
options.setCapability("se:downloadsEnabled", true); // Works when commented
HashMap<String, Object> chromePref = new HashMap<>();
chromePref.put("plugins.always_open_pdf_externally", Boolean.valueOf(true));
chromePref.put("download.prompt_for_download", Boolean.valueOf(false));
chromePref.put("safebrowsing_for_trusted_sources_enabled", oolean.valueOf(false));
options.setExperimentalOption("prefs", chromePref);
driver = new RemoteWebDriver(new URL("http://localhost:4444/"), options);
}
- Chrome browser:114.0
- Selenium: 4.9.0
- ChromeDriver 114.0.5735.90
I'd appreciate any help from anyone.
Thanks