[英]Accept request to microphone in Chrome using selenium
I'm writing selenium tests python using webdriver and my test cases require access to user media (microphone).我正在使用 webdriver 编写 selenium 测试 python,我的测试用例需要访问用户媒体(麦克风)。 I tried different variations of --disable-user-media-security flag but couldn't achieve what I want.
我尝试了--disable-user-media-security标志的不同变体,但无法实现我想要的。 I'm doing something this:
我正在做这样的事情:
chrome_options = Options()
chrome_options.add_argument("--disable-user-media-security")
self.driver = webdriver.Chrome('/Users/xxx/Develop/WebME/chromedriver', chrome_options=chrome_options)
driver = self.driver
Any ideas on how to handle this?关于如何处理这个的任何想法? There must be some way to do get access to mic :/
必须有某种方法可以访问麦克风:/
对于麦克风,将此选项添加到 chrome:
chrome_options.add_argument("--use-fake-ui-for-media-stream")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.