Hi all,
I’m currently facing an issue running our Selenium tests on Chrome in headless mode via Selenium Grid.
🔧 Scenario:The test navigates to our web app (Client Portal) where a “Record Video” button appears.
On clicking the button, the app requests camera and microphone permissions.
We're not uploading any files, just need to simulate camera access for recording.
Tests are executed using the --headless=new Chrome mode on the Grid.
We’ve already added the following ChromeOptions:
Even after adding these arguments, the browser permission popup still appears during test execution, causing the test to hang or fail.
✅ Expected:With the above flags, the browser should automatically allow camera/mic access and suppress the permission popup.
🧪 Setup:Selenium Grid with Chrome (headless)
Java + TestNG
RemoteWebDriver is used to pass ChromeOptions
Has anyone successfully run WebRTC camera access tests in headless mode using Selenium Grid?
Any ideas why the permission popup still appears?
Do we need to simulate a media stream with a fake file?
Could this be due to a mismatch in Chrome version, or the Grid node not accepting the flags?
Any guidance would be appreciated!
Thanks,
Ramapriya
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches",
Arrays.asList("disable-popup-blocking"));--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/7cb65624-f1ad-4bde-8555-67a574e7107bn%40googlegroups.com.
Remove the excludeSwitches line entirely. The disable-popup-blocking argument should remain enabled (not excluded) to ensure permission dialogues are handled properly in headless mode.
This configuration will automatically grant camera and microphone permissions without showing any pop-up dialogues in your Selenium Grid tests.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/CAGRAuNXyKqTgfePTBKtY7tjbX_wBVS_DKHNEHo0EPLUsXAU8Tw%40mail.gmail.com.