我尝试用Google搜索,但找不到解决方案。谁能告诉我如何在 Cypress 版本 13 中允许浏览器权限,例如摄像头、麦克风和通知?
截图:
您必须设置以下启动选项
麦克风:
--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
希望有帮助 🙂