![always load firefox profile manager always load firefox profile manager](https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2019-08-05-15-52-50-74fddb.png)
Options.addPreference("pdfjs.disabled", true) Options.addPreference("", "text/plain charset=utf-8 text/csv application/json charset=utf-8 application/pdf text/plain application/text text/xml application/xml") //includes a varied list of context-type but feel free to add others Options.addPreference("", "") // Set your default download directory's path Options.addPreference("", 2) //Last downloaded folder Options.addPreference("",2) įirefoxOptions options = new FirefoxOptions() //For setting up options for FirefoxĭesiredCapabilities firefoxDesiredCapabilities = new DesiredCapabilities() //Initializing desired capabilities To download to another folder: FirefoxOptions options = new FirefoxOptions() To download to desktop, change the value in 2nd line to 0: FirefoxOptions options = new FirefoxOptions() Options.addPreference("", "application/octet-stream") To download to folder Downloads: FirefoxOptions options = new FirefoxOptions() mentioned above.įor me, download csv file and found that Content-Type = "application/octet-stream" WebDriver driver = new FirefoxDriver(options) ĭriver.findElement(By.linkText("IRS Form 872-C")).click()
ALWAYS LOAD FIREFOX PROFILE MANAGER PDF
tPreference("pdfjs.disabled", true) // disable the built-in PDF viewer tPreference("", "application/pdf text/plain application/text text/xml application/xml") Then to download a PDF with Firefox: FirefoxOptions options = new FirefoxOptions() The mime type is the Content-Type from the response header:.In the network panel, select the first request.Just like suggested, it's most probably another mime type.