I am using Selenide framework and Java to write some automation tests. One of my tests is file download. After clicking download button Chrome gives message "This type of file can harm your computer. Do you want to keep file.xml anyway?". Is it possible to disable this? I tried below code but it does not work for me.
System.setProperty("webdriver.chrome.driver", "path/to/chromedriver");
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("safebrowsing.enabled", "true");
options.setExperimentalOption("prefs", prefs);
ChromeDriver chromeDriver = new ChromeDriver(options);
Configuration.browser = "chrome";