Eclipse IDE Automation test for Edge

61 views
Skip to first unread message

Jeanne Almagor

unread,
Apr 3, 2021, 6:06:07 PM4/3/21
to Selenium Users
Hello,
How can i click or disable Mic. and Camera Pop Up while testing in Edge?
I'm using Java.
I did this code with Chrome browser and it worked but it doesn't work with Edge because Eclipse doesn't support the "options.addArguments". I tryed to download newest version of Eclipse and still no success.

ChromeOptions options = new ChromeOptions();
    options.addArguments("use-fake-device-for-media-stream");
    options.addArguments("use-fake-ui-for-media-stream");
    
    HashMap<String, Object> prefs = new HashMap<String, Object>();
    prefs.put("profile.default_content_setting_values.media_stream_mic", 1);
    prefs.put("profile.default_content_setting_values.media_stream_camera", 1);
    prefs.put("profile.default_content_setting_values.geolocation", 1);
    prefs.put("profile.default_content_setting_values.notifications", 1);
    options.setExperimentalOption("prefs", prefs);
    System.setProperty("webdriver.chrome.driver", "C:\\QA\\Automation\\Workspace\\chromedriver.exe");
WebDriver driver = new ChromeDriver(options);


Thanks!

SuperKevy

unread,
Apr 4, 2021, 2:23:42 PM4/4/21
to Selenium Users
Isn't that an OS setting. 

 Turn On or Off Microphone from Windows 10 Settings App

  • Press Win + I keyboard shortcut to open the Settings app.
  • Go to the “ Privacy → Microphone ” page.
  • On the right page, click on the “ Change ” button under the “Allow access to the microphone on this device” section.
  • Toggle the switch to “ Off ” position.

Jeanne Almagor

unread,
Apr 4, 2021, 4:20:59 PM4/4/21
to seleniu...@googlegroups.com
Thanks, i've tried to do it first thing but unfortunately Eclipse opens up new window each time and i can not control the settings there...
I had same problem in Chrome and i've fixed it with the code, but in Edge the code doesn't work.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/90011ddf-8b2d-4f33-bdc3-38a5cda7fcb1n%40googlegroups.com.
--
Jeanne Almagor
C: +1 437 221 4772
Reply all
Reply to author
Forward
0 new messages