I'm trying to use node selenium in Firefox to click a link in the browser, which then triggers a download of an excel file to take place. I'd like the file to download to a set directory, but when the link is clicked, a dialog box appears asking if I'd like to save the file or open it. I've tried setting options both in the code and within the Firefox browser itself, but have had no luck. Here is the code I am currently using...
let options = new firefox.Options();
options.setPreference("browser.download.dir", "C:\\recapp_excel");
options.setPreference("browser.helperApps.alwaysAsk.force", false);
let driver = await new Builder()
.forBrowser('firefox')
.setFirefoxOptions(options)
.build();