0

I am trying to set the options for Watir with chrome driver, but can no figure out how to set:

chrome://settings/content/pdfDocuments to true or false.

What would the pref variable be to set this?

Watir::Browser.new :chrome, options: {prefs: prefs}

Lefty
  • 535
  • 6
  • 20

1 Answers1

0

Are you looking for this? https://stackoverflow.com/a/42927095/4072371

prefs = {"plugins.always_open_pdf_externally" => true}
Watir::Browser.new :chrome, options: {prefs: prefs}

Make sure you are using a String for the prefs key

titusfortner
  • 4,099
  • 2
  • 15
  • 29