Capybara: Disable sound during Selenium tests

Posted About 7 years ago. Visible to the public.

If the application under test makes sound, you probably want to disable this during integration testing.

You can use the args option to pass parameters to the browser. For Chrome:

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, browser: :chrome, args: ["--mute-audio"])
end

I haven't found a corresponding command line option for Firefox Show archive.org snapshot .

Hat tip to kratob Show archive.org snapshot .

Henning Koch
Last edit
About 7 years ago
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2017-02-07 15:03)