接受使用selenium的Chrome话筒请求

2024-06-26 14:27:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用webdriver编写selenium测试python,我的测试用例需要访问用户媒体(microscope)。我尝试了--disable-user-media-security标志的不同变体,但未能达到我想要的效果。我在做一件事:

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

有什么办法吗?一定有办法找到麦克风:/


Tags: 用户selfdriverselenium测试用例chromemedia媒体