change the download directory without the popup window at chrome
Add below arguments as chromeOptions :-
options.addArguments("disable-popup-blocking")
Hope it will help you..:)
Can you try this?
String downloadFilepath = "download"; Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put("download.default_directory", downloadFilepath); DesiredCapabilities caps = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("prefs", prefs); caps.setCapability(ChromeOptions.CAPABILITY, options);