I’m trying to run an end to end test for a video chat platform, using 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.setUserPreferences({"preferences.profile.content_settings.exceptions.media_stream_camera.'<local-host-address>,*'.setting": 1, "preferences.profile.content_settings.media_stream_mic.'<local-host-address>,*'.setting": 1});
let driver = await new Builder().setChromeOptions(options).forBrowser(browser).build();
Version 2:In Version 1, the pop-up still comes up and I can’t find a way to click the allow button. In Version 2, the driver just quits when it gets the point where it would use the webcam/ mic. I tried setting the user data dir to the settings I have on my Chrome browser using the following code, but the pop up still comes up.
let options = new Options();
Using a fake device/UI doesn’t resolve the issue, we need to access the real webcam. Does anyone know how to do this?