4

I'm writing selenium tests python using webdriver and my test cases require access to user media (microphone). I tried different variations of --disable-user-media-security flag but couldn't achieve what I want. 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 :/

Moshe Slavin
  • 4,939
  • 5
  • 21
  • 36
Aki Nishanov
  • 1,127
  • 9
  • 10

1 Answers1

0

For microphone, add this option to chrome:

chrome_options.add_argument("--use-fake-ui-for-media-stream")

lrnzcig
  • 3,652
  • 4
  • 35
  • 48
Seema Nair
  • 147
  • 7