selenium - 禁用 Firefox 的声音? ( Selenium 网络驱动程序编程)

标签 selenium webdriver

我想知道是否有办法通过 selenium 中的配置文件设置禁用来自 Firefox 的声音?

最佳答案

您可以将 'media.volume_scale' firefox 属性设置为“0.0”
FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.setPreference("media.volume_scale", "0.0");

关于selenium - 禁用 Firefox 的声音? ( Selenium 网络驱动程序编程),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12158366/

相关文章:

flash - 使用 Selenium 和 Webdriver 截取 flash 对象的屏幕截图

javascript - Mocha.js 测试 bail(false) 不适用于 beforeEach

ruby-on-rails - cucumber 和瓦蒂尔突然停止工作

java - 如何在测试失败后停止运行 TestNG

selenium - 在 Selenium 中,ChromeDriver 可执行文件如何找到 Chrome 浏览器?

python - 如何通过 requests.get 或 selenium 处理 catch 和处理重定向循环?

javascript - Selenium /Java : How to write element locator for an element with aria-selected=false

python - 在页面上使用 selenium 查找电子邮件地址

node.js - 使用 Selenium 和 NodeJS 从 onclick 按钮下载文件

python - 在 Selenium Python 中检查网站的 .readyState 的正确语法是什么?