What happened?
I have created a folder. If I try to download an Excel file, the file will download there, but when I run my test in the Edge browser, it downloads to the default download location.
How can we reproduce the issue?
HashMap<String, Object> edgePrefs = new HashMap<>();
edgePrefs.put("download.default_directory", System.getProperty("user.dir") + "\Download-Files"); edgePrefs.put("profile.default_content_settings.popups", 0); edgePrefs.put("profile.default_content_setting_values.automatic_downloads", 1);
EdgeOptions EdgeOptions options = new EdgeOptions();
options.setExperimentalOption("prefs", edgePrefs);
I have tried this way, but setExperimentalOption shows an error: The method setExperimentalOption(String, HashMap<String, Object>) is undefined for the type EdgeOptions
Relevant log output
Operating System
Windows 11
Selenium version
Java 4.27.0
What are the browser(s) and version(s) where you see this issue?
Edge
What are the browser driver(s) and version(s) where you see this issue?
Edge
Are you using Selenium Grid?
No