I've got a page running on a local webserver, on an https page, that uses the getUserMedia API to do some photobooth-style webcam stuff.
In ChromeDriver, the browser won't remember the "Always allow" setting for allowing webcam access. I'm given the option, and it remembers that preference while the browser's running, but once I quit/re-open, the prompt returns.
I'm running Chromedriver 26.0.1383.0.
Does anybody know how to make that preference stick around permanently?
I had the same issue. I solved it by doing the following in C#
var driverService = ChromeDriverService.CreateDefaultService();
var options = new ChromeOptions();
options.AddArgument("use-fake-device-for-media-stream");
options.AddArgument("use-fake-ui-for-media-stream");
var ChromeDriver = new ChromeDriver(driverService, options);
It's very similar to siddhadev's suggestion. Figured I'd add a codding sample showing how Chrome Options can be used within Selenium.
Hope this helps!