如何在cypress版本13中允许浏览器权限

问题描述 投票:0回答:1

我尝试用Google搜索,但找不到解决方案。谁能告诉我如何在 Cypress 版本 13 中允许浏览器权限,例如摄像头、麦克风和通知?

截图: Your Microphone is blocked

firefox automation cypress
1个回答
0
投票

您必须设置以下启动选项

麦克风:

--auto-accept-camera-and-microphone-capture

其他选项:https://peter.sh/experiments/chromium-command-line-switches/

要配置启动选项,请参阅https://docs.cypress.io/api/plugins/browser-launch-api#Override-the-device-pixel-ratio

希望有帮助 🙂

© www.soinside.com 2019 - 2024. All rights reserved.