I’m trying to run an end to end test for a video chat platform, using the ChromeDriver. I need to use the actual webcam stream on my computer to run the test. I’ve tried both versions of the following code, but neither actually defaults the mic/camera settings to allow.
Version 1:let options = new Options();
options.set("preferences.profile.content_settings.exceptions.media_stream_camera.'<localhost-address>,*'.setting", 1)
options.set("preferences.profile.content_settings.media_stream_mic.'<localhost-address>,*'.setting", 1);
let driver = await new Builder().setChromeOptions(options).forBrowser(browser).build();
Version 2:let options = new Options();
options.setUserPreferences({"preferences.profile.content_settings.exceptions.media_stream_camera.'http://localhost:3005,*'.setting": 1,
"preferences.profile.content_settings.media_stream_mic.'http://localhost:3005,*'.setting": 1});
let driver = await new Builder().setChromeOptions(options).forBrowser(browser).build();
The pop-up still comes up and I can’t find a way to click the allow button. Using a fake device/UI doesn’t resolve the issue, because it’s incompatible (to my knowledge) with Twilio, which the platform also uses.