FirefoxOptions options = new FirefoxOptions();
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.download.folderList", 2);
profile.setPreference("browser.download.dir", "C:\\Temp");
profile.setPreference("browser.download.useDownloadDir", true);
profile.setPreference("browser.download.viewableInternally.enabledTypes", "");
profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/msword;application/ms-doc;application/doc;application/pdf;text/plain;application/text;text/xml;application/xml");
options.setProfile(profile);
FirefoxDriver driver = new FirefoxDriver("{TP_DEV_TOKEN}", options);