Closed melissagwolf closed 3 years ago
It turned out that the MIME type was not a text/csv but rather application/x-csv. Also, having the same file types for browser.helperApps.neverAsk.openFile
and browser.helperApps.neverAsk.saveToDisk
was contradictory. Since I wanted it to automatically save the file, I needed to only include browser.helperApps.neverAsk.saveToDisk
. To find the MIME type of the file I was attempting to download, I followed these steps: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Configuring_server_MIME_types. Hope that helps someone.
Operating System: Windows 10
Selenium Server version (selenium-server-standalone-3.0.1.jar etc.): Rselenium version 1.7.7. -- R 4.0.3
Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.): 90.0.2
Other driver version (chromedriver 2.27, geckodriver v0.11.1, iedriver x64_3.0.0, PhantomJS 2.1.1 etc.): Not using any of these
Expected behaviour: File automatically downloaded into folder of choice
Actual behaviour: Pop up window asking me if I want to open or save file
Steps to reproduce the behaviour:
I am attempting to hundreds of csv files from a website, and I need to use makeFirefoxProfile to override the default pop-up window that asks me if I want to open or save the file. I used the following syntax:
However, the profile doesn't register. The pop-up window still opens, preventing the file from downloading without my clicking on it manually, and when I do click on it manually, it goes into my default downloads folder instead.