title: How to disable or accept the Chrome pop up while downloading using Selenium
body: <p>I know this question was asked here <a href="https://stackoverflow.com/questions/34130774/how-to-disable-this-type-of-file-can-harm-your-computer-pop-up">How to disable &#39;This type of file can harm your computer&#39; pop up</a>
  But the post also says the given solution does not work for all the chrome version.</p>
  
  <p>I tried every possible thing still can not disable the pop up or select keep the file button.I am using chrome Version 62.0.3202.89 (Official Build) (32-bit)</p>
  
  <p>I used below code but not working...:(</p>
  
  <pre><code>    HashMap&lt;String, Object&gt; chromePrefs = new HashMap&lt;String, Object&gt;();
      chromePrefs.put("profile.default_content_settings.popups", 0);
      chromePrefs.put("download.default_directory", downloadDir);
      options.setExperimentalOption("prefs", chromePrefs);
      chromePrefs.put("safebrowsing.enabled", "true");
      options.addArguments("--safebrowsing-disable-download-protection");
      //options.addArguments("--test-type");
     // options.addArguments("--disable-extensions"); //to disable browser extension popup
      //options.addArguments("--safebrowsing-disable-extension-blacklist");
  </code></pre>
  
  <p>Please help if anyone knows how to make the download start when chrome warning pops up saying "This type of file can harm your computer.Do you want to keep the jar anyway?"</p>