Hi everyone,
I am trying to upgrade selenium from version 3 to version 4, but the Firefox webdriver capabilities seems to not be passed to the driver.
The biggest issue is that pdfjs.disable option is not passed.
The language is Java, I am using Selenium 4.12.0, firefox version is 116.
Firefox ffop = new FirefoxOptions();
ffop.addPreference("browser.helperApps.neverAsk.saveToDisk", "application/pdf");
ffop.addPreference("pdfjs.disabled", true);
ffop.addPreference("browser.download.panel.shown", false);
ffop.addPreference("useAutomationExtension", false);
ffop.addPreference( "plugins.always_open_pdf_externally", false);
ffop.addPreference("pdfjs.firstRun", false);
ffop.addPreference("plugin.disable_full_page_plugin_for_types", "application/pdf,application/vnd.adobe.xfdf,application/vnd.fdf,application/vnd.adobe.xdp+xml");
ffop.addPreference("plugin.scan.Acrobat", "99.0");
ffop.addPreference("plugin.scan.plid.all", false);
I am passing the options as this:
FirefoxOptions firefoxOptions = new FirefoxOptions();
static Map<String, Object> capabilities = new HashMap<>();
capabilities.put("moz:firefoxOptions", ffop);
firefoxOptions.setCapability("cloud:options",capabilities);
firefoxOptions.setCapability("selenoid:options", selenoidOptions);
remoteWebDriver = new RemoteWebDriver(url, firefoxOptions);
Thank you