Forum Discussion

Madhusudan26's avatar
Madhusudan26
Copper Contributor
Feb 04, 2020

How to enable 'Mircophone' access in Edge browser using Selenium?

WebDriverManager.EdgeDriver().setup();
EdgeOptions options = new EdgeOptions();
edgeOptions.AddAdditionalCapability("dom.webnotifications.enabled",1);
edgeOptions.AddAdditionalCapability("permissions.default.microphone", 1);
edgeOptions.AddAdditionalCapability("permissions.default.camera", 1);
driver = new EdgeDriver(options);

 

But above code is not working

Plz give solution to auto allow mic/camera using selenium automation

6 Replies

  • johnjansen's avatar
    johnjansen
    Iron Contributor

    Madhusudan26 have you ever seen this work with other webdriver versions (like with the old Edge, Firefox, or Chrome)? When I look, it does not look like this should work, so I'm curious about that.

     

    -John 

    • Madhusudan26's avatar
      Madhusudan26
      Copper Contributor

      Hello John
      please give the solution of above comment.
      And tell me its issue or bug in Microsoft edge

    • Madhusudan26's avatar
      Madhusudan26
      Copper Contributor

      johnjansenFor C# code in visual studio

      For the chrome below things are working and not shown micro phone allow notification by using below code

      ChromeOptions CHoptions = new ChromeOptions();
      CHoptions.AddArguments("use-fake-ui-for-media-stream");
      CHoptions.AddArguments("use-fake-device-for-media-stream");
      driver = new ChromeDriver(CHoptions);

       

      But in new Microsoft edge chromium version 79 & 80, i'm using but not find any solution on to allow microphone notification

      • Madhusudan26's avatar
        Madhusudan26
        Copper Contributor
        Plz let give solution to any one on the above query ASAP.

Resources