I did not get a specific chrome option to work fine, when started chrome per python selenium webdriver script.
The goal is to start chrome in a python selenium script with a fake webcam, which plays a video file.
The problematic options are "use-file-for-fake-video-capture" combined with "use-fake-device-for-media-stream":
options.add_argument("--use-fake-device-for-media-stream")
options.add_argument("--use-file-for-fake-video-capture=C:\Testfiles\videofiles\bus_cif.y4m")
Both Options are working totally fine used in a batch-file with chrome.exe. For example, the following batch is working fine and used fake webcam videofile:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --use-fake-device-for-media-stream --use-file-for-fake-video-capture=C:\Testfiles\videofiles\bus_cif.y4
Also, the rest of my python chrome webdriver script options are working fine, so the code itself should be correct. For example, the following options are working fine:
options.add_argument("--allow-file-access-from-files")
options.add_argument("--use-fake-ui-for-media-stream")
options.add_argument("--disable-infobars")
Chrome 97.x (with newest stable chromium webdriver files)
Is there something special about the option "use-file-for-fake-video-capture" when used in a python script with options? Or perhaps the path have to be in another format?
Thanks a lot!