While reviewing someone else's code, I encountered an issue with automatically downloading PDF files from a web page using selenium.
Despite setting the browser.helperApps.neverAsk.saveToDisk property to the PDF mime type, I am still getting the firefox download confirmation prompt.
I have tried downgrading my Firefox version from 70 to 60.0 but that did not solve the problem. It is unclear whether this is a code issue or a compatibility problem between Selenium and Firefox.
I would greatly appreciate any assistance.
edit: Here is what the download confirmation pop up looks like.
private static final String mimeTypeToSaveToDisk = "application/pdf;application/zip";
public void download(String url, String downloadDirPath) {
// Code for downloading
}