title: Selenium deal with download diaglogs
body: <p>I am trying to use Selenium to download some files (.3ds).
  I am using FireFox (v94.0.1 64-bit), but am fine to use another browser if it will help.
  I am using MacOS.</p>
  <p>The issue is that when I click a download link, a dialog is shown:
  <a href="https://i.stack.imgur.com/o1Rfh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o1Rfh.png" alt="enter image description here" /></a></p>
  <p>I don't want any user input; this should all be automatic.
  I need to get Selenium to click <code>save file</code>, check <code>do this automatically...</code>, and then click <code>OK</code>.</p>
  <p>I have tried the solutions in <a href="https://stackoverflow.com/questions/24852709/how-do-i-automatically-download-files-from-a-pop-up-dialog-using-selenium-python">this</a> post, but the dialog is always shown:</p>
  <pre><code>profile = webdriver.FirefoxProfile()
  profile.set_preference(&quot;browser.download.panel.shown&quot;, False)
  profile.set_preference(&quot;browser.helperApps.neverAsk.openFile&quot;,&quot;application/octet-stream&quot;)
  profile.set_preference(&quot;browser.helperApps.neverAsk.saveToDisk&quot;, &quot;application/msword, application/csv, application/ris, text/csv, image/png, application/pdf, text/html, text/plain, application/zip, application/x-zip, application/x-zip-compressed, application/download, application/octet-stream&quot;);
  profile.set_preference(&quot;browser.download.manager.showWhenStarting&quot;, False);
  profile.set_preference(&quot;browser.download.manager.alertOnEXEOpen&quot;, False);
  profile.set_preference(&quot;browser.download.manager.focusWhenStarting&quot;, False);
  profile.set_preference(&quot;browser.download.folderList&quot;, 2);
  profile.set_preference(&quot;browser.download.useDownloadDir&quot;, True);
  profile.set_preference(&quot;browser.helperApps.alwaysAsk.force&quot;, False);
  profile.set_preference(&quot;browser.download.manager.alertOnEXEOpen&quot;, False);
  profile.set_preference(&quot;browser.download.manager.closeWhenDone&quot;, True);
  profile.set_preference(&quot;browser.download.manager.showAlertOnComplete&quot;, False);
  profile.set_preference(&quot;browser.download.manager.useWindow&quot;, False);
  profile.set_preference(&quot;services.sync.prefs.sync.browser.download.manager.showWhenStarting&quot;, False);
  profile.set_preference(&quot;browser.download.dir&quot;,&quot;/Users/myusername/Downloads&quot;)
  browser = webdriver.Firefox(firefox_profile=profile,executable_path=GeckoDriverManager().install())
  browser.maximize_window()
  </code></pre>
  <p>How can I solve this?</p>