Capybara: Disable sound during Selenium tests

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|, browser: :chrome, args: ["--mute-audio"])

I haven't found a corresponding command line option for Firefox Archive .

Hat tip to kratob Archive .

Henning Koch almost 5 years ago
This website uses short-lived cookies to improve usability.
Accept or learn more