I am trying to test around a webcam using fake stream, however, there is a check to see if the camera settings is allowed before it can work.
I am working with testcafe and my code is similar to what is below which doesn't work for the args (unless without the profile).
Using --use-fake-ui-for-media-stream
and --use-file-for-fake-video-capture
works for stream, however the check for camera settings still fails. I tried using a user profile which works for the camera settings but not the chrome arguments. Does anyone know how I can combine these two to work ?
chrome:userProfile --start-fullscreen --allow-insecure-localhost --use-fake-device-for-media-stream --use-fake-ui-for-media-stream --use-file-for-fake-video-capture="/path/to/video.y4m" ')
Chrome can't apply CLI flags without creating a new browser instance and can't create a new browser instance if you have other Chrome instances that use the same profile.
If you want to use "chrome:userProfile" together with CLI flags, you can close all Chrome processes on your machine. Or you can create a dedicated directory for a temporary Chrome profile and use it in tests by specifying chrome --user-data-dir=$TEMP_PROFILE_DIRECTORY
as a browser.