4

I am writing a test automation framework using Java and Selenium. I am running the tests both locally and also using Browserstack.

The website under tests includes features that use the PC's camera to scan documents and faces.

Instead of using the PC's webcam I want to fake a stream.

Has anybody managed to do this?

I am using the following Chrome options:

chromeOptions.addArguments("--use-fake-ui-for-media-stream");
chromeOptions.addArguments("--use-fake-device-for-media-stream");
chromeOptions.addArguments("--use-file-for-fake-video-capture=C:/deleteme/bus.y4m");

When I click on the button that would normally open the webcam, the webcam does NOT open, so it looks like it is doing something. However my video doesn't play.

Has anybody got these to work for a scenario similar to mine and could provide more info on how to do it?

Any help would be appreciated. Thanks.

Matt
  • 281
  • 3
  • 14

0 Answers0