How to change settings for PDF documents in Chrome via Selenium ChromeOptions

Viewed 11

I would like to change settings via Selenium ChromeOprtions (Java) in chrome://settings/content/pdfDocuments to download PDF files instead of opening them in browser. I went through all topics regarding this, but most of them are many years old and the proposed solution does not work.

Now I'm trying to set inside Chrome prefs these options:

  profile.default_content_setting_values.automatic_downloads: 1
  download.prompt_for_download: false
  download.directory_upgrade: true
  profile.default_content_settings.cookies: 2
  profile.default_content_settings.popups: 0
  download.default_directory: 'C:\tools'
  plugins.always_open_pdf_externally: true

Download directory is updated, but chrome://settings/content/pdfDocuments remaining unchanged.

Thank you, H.

0 Answers
Related