我尝试使用配置文件设置在 Firefox 中下载文件,但它不起作用你能告诉我我做错了什么吗?我使用的代码发布在此行下方
var profile = new FirefoxProfile { EnableNativeEvents = true };
profile.SetPreference("browser.download.folderList", 2);
profile.SetPreference("browser.download.manager.showWhenStarting", false);
profile.SetPreference("browser.download.dir", folderName);
profile.SetPreference("browser.download.downloadDir", folderName);
profile.SetPreference("browser.download.defaultFolder", folderName);
profile.SetPreference("browser.helperApps.neverAsk.saveToDisk", "image/jpeg,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.spreadsheet," +
"application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.graphics," +
"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet," +
"application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation," +
"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.mozilla.xul+xml," +
"application/vnd.google-earth.kml+xml");