Getting permission to media devices in automation test

I want the permission to webcam and mic for testing my website on Lambdatest. Is there a way I can get that?

1 Like

Yes Richard, you can get access to fake mic and fake webcam stream. You would need to pass the following scripts in your browser options:

“use-fake-device-for-media-stream”

“use-fake-ui-for-media-stream”

I am sharing an example for the same for chrome:

> ChromeOptions options = new ChromeOptions();
> options.addArguments("use-fake-ui-for-media-stream");
> options.addArguments("use-fake-ui-for-media-stream");

I hope this would help you.

1 Like