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,816
  • 57
  • 73
  • 92
Xtraterrestrial
  • 431
  • 1
  • 4
  • 10

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 stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
Jagrut
  • 96
  • 1
  • 8