Please find the below code with the chrome capabilities. In fact the browser is not downloading the file to the specified path.
private static DesiredCapabi
The ans which help me to resolve this issue on windows (https://bugs.chromium.org/p/chromedriver/issues/detail?id=783).
Map prefs = new HashMap();
prefs.put("download.default_directory", System.getProperty("user.dir")+ File.separator + "externalFiles" + File.separator + "downloadFiles");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", prefs);
ChromeDriver driver = new ChromeDriver(options);