Search code examples
selenium-webdriverselenium-gridselenium-edgedriver

how to allow mic/camera in edge web browse suing selenium


we have options.add_argument("--use-fake-ui-for-media-stream") options.add_argument("--use-fake-device-for-media-stream") to send fake media to chrome. Is there any such option available for edgedriver? and if what are those?


Solution

  • one can allow mic/video in edge using

    option = Options()
    #capabilities = webdriver.DesiredCapabilities.EDGE.copy()
    
    option.set_capability("dom.webnotifications.enabled", 1)
    option.set_capability("permissions.default.microphone", 1)
    option.set_capability("permissions.default.camera", 1)
    
    print type(option)
    
    
    op= option.to_capabilities()
    
    driver = webdriver.Edge(capabilities=op)