Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox headless: Grant access to camera/microphone in Selenium test

  • No replies
  • 0 have this problem
  • 10 views
more options

I'm currently building/testing a website with Firefox and Selenium, which requires interacting with the camera/microphone.

To avoid having real hardware present, I've configured media.naviagator.streams.fake=true, however for some time now, this isn't enough anymore (not exactly sure for how long).

When running normally (i.e. not headless), I can see that the permission prompt ("Allow website to use your camera/microphone?"), but I can't interact with it from Selenium.

Is there a way to disable this prompt programmatically?

I'm currently building/testing a website with Firefox and Selenium, which requires interacting with the camera/microphone. To avoid having real hardware present, I've configured media.naviagator.streams.fake=true, however for some time now, this isn't enough anymore (not exactly sure for how long). When running normally (i.e. not headless), I can see that the permission prompt ("Allow website to use your camera/microphone?"), but I can't interact with it from Selenium. Is there a way to disable this prompt programmatically?