Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use FireFox's built-in javascript PDF viewer with WebDriver so I can access the DOM of a PDF. However, FireFox has an Adobe plugin which takes over and displays the PDF. Whatever preferences I set in about:config don't help. I've tried various preferences, like:

profile.SetPreference("extensions.autoDisableScopes", 0);
profile.SetPreference("pdfjs.disabled", false);
profile.SetPreference("pdfjs.firstRun", false);

But whatever combination I use either kills the Adobe plugin and pdfjs or gives me a popup asking where to save the PDF. If I manually disable the Adobe plugin, the javascript viewer takes over

How can I disable the Adobe plugin, but keep FireFox's javascript PDF enabled and access the DOM of the PDF?

share|improve this question
Is it an option to uninstall the adobe plugin? – vincebowdren Aug 9 '13 at 15:28
Frustratingly, no. – Lord Kinboat Aug 12 '13 at 10:53

This worked for me (think setting 'pdfjs.migrationVersion' did the trick)

FirefoxProfile desiredCapabilities = new FirefoxProfile();      
desiredCapabilities.setPreference("plugin.disable_full_page_plugin_for_types", "application/pdf");
desiredCapabilities.setPreference("", 2); 
desiredCapabilities.setPreference("pdfjs.disabled", false); 
desiredCapabilities.setPreference("pdfjs.firstRun", false); 
desiredCapabilities.setPreference("pdfjs.migrationVersion", 1);

WebDriver driver = new FirefoxDriver(desiredCapabilities);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.