![]() ![]() ![]() Only when first changed at runtime, the pdf viewer is really disabled. Unless you change pdfjs.disabled to true at runtime within the about:config page. ![]() Unfortunately with the used Firefox version this config has no effect. WebDriver webdriver = new FirefoxDriver(firefoxOptions) FirefoxProfile firefoxProfile = new FirefoxProfile() įtAcceptUntrustedCertificates(true) įtAssumeUntrustedCertificateIssuer(true) įtPreference("", 2) įtPreference("", 0) įtPreference("", true) įtPreference("", "application/pdf") įtPreference("", "application/pdf") įtPreference("", false) įtPreference("", false) įtPreference("", false) įtPreference("", false) įtPreference("", false) įtPreference("", false) įtPreference("", false) įtPreference(".", false) įtPreference("", false) įtPreference("pdfjs.disabled", true) įirefoxOptions firefoxOptions = new FirefoxOptions() įtProfile(firefoxProfile) The preference pdfjs.disabled should deactivate the viewer so created the driver instance with a profile (and also tried some more preferences). Instead of downloading the pdf, a built-in viewer will be opened. For example at this link there is a download button where I can let selenium perform a click on. I face problems when it comes to an automated download of a PDF file with Firefox. ![]() I'm working on an upgrade of our internal Java Selenium framework to the latest version 3.14.0 in combination with Firefox 61.0 and Geckodriver 0.21.0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |