I am trying to automate the process of joining a conference call but I'm running into issues with video and audio permissions. I want to allow selenium access to video and audio.
After searching online for a solution for over a day, here's what I've tried with zero success:
1.Using just setChromeOptions
:
let driver = new Builder()
.usingServer("http://127.0.0.1:4444/wd/hub/")
.forBrowser("chrome")
.setChromeOptions({
"prefs": {
"profile.default_content_setting_values.media_stream_mic": 1,
"profile.default_content_setting_values.media_stream_camera": 1
},
"args": ["--use-fake-device-for-media-stream", "--use-fake-ui-for-media-stream"]
})
.build();
This doesn't seem to do anything. I'm not getting any error when I run this but it's not helping either.
- Using capabilites:
let driver = new Builder()
.usingServer("http://127.0.0.1:4444/wd/hub/")
.forBrowser("chrome")
.withCapabilities({ "browserName": "Chrome", "chromeOptions": {
"args": ["--use-fake-device-for-media-stream", "--use-fake-ui-for-media-stream"]
}
})
.build();
Which gives me this error which I haven't been able to figure out how to resolve:
I really need this to work and I can't seem to find a way. Any help is highly appreciated.
Node version: v15.5.1
question from:
https://stackoverflow.com/questions/65897819/unable-to-allow-website-camera-and-microphone-access-with-selenium-chromedriver 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…