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}
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.