How do I allow Chrome to use my microphone programmatically?

后端 未结 5 614
耶瑟儿~
耶瑟儿~ 2020-12-28 09:12

I am currently trying to run some tests made with webdriverjs and chromedriver but they need microphone permissions.

This is the popup that shows up:

<
5条回答
  •  梦谈多话
    2020-12-28 09:43

    For those using Python, this worked for me:

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    
    chrome_options = Options()
    chrome_options.add_argument("--use-fake-ui-for-media-stream")
    driver = webdriver.Chrome(chrome_options=chrome_options)
    

提交回复
热议问题