Skip to content

Question about disabling plugin/extension #336

@zsan

Description

@zsan

Hello,

Just for my curiosity, is that possible to disable plugin with Ferrum or CDP ?

For example, i have this code with capybara to disable PDF Viewer

Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.load_selenium

  browser_options = Selenium::WebDriver::Chrome::Options.new

  browser_options.add_preference(
    :download,
    directory_upgrade: true,
    prompt_for_download: false,
    extensions_to_open: "applications/pdf"    
  )

  browser_options.add_preference(
    :plugins,
    always_open_pdf_externally: true,
    plugins_disabled: ["Chrome PDF Viewer"]    
  )

  Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions