2

I understand there are various flags/parameters you can pass using desired caps to enable access to camera, microphone, etc.

For instance on Chrome you can use ChromeOption and pass 'profile.default_content_setting_values.media_stream_mi' under 'prefs'.

I wish to enable the microphone access on Edge browser. I am not able to find any related information. Can somebody assist me here?

For Chrome you can enable the same like mentioned here-

How to allow or deny notification geo-location microphone camera pop up

TylerH
  • 20,799
  • 66
  • 75
  • 101
Xtraterrestrial
  • 651
  • 1
  • 6
  • 12

1 Answers1

1

You can use the following preferences to allow camera, microphone in Edge Browser.

WebDriverManager.edgedriver().setup();
EdgeOptions options = new EdgeOptions();
options.setCapability("dom.webnotifications.enabled", 1);
options.setCapability("permissions.default.microphone", 1);
options.setCapability("permissions.default.camera", 1);
driver = new EdgeDriver(options);
Zoe
  • 27,060
  • 21
  • 118
  • 148
Jagrut
  • 96
  • 1
  • 8