Grant access to video and audio in Chrome 48 via Selenium Chromedriver automatically
问题 I would like to automatically grant access to video and audio in Chrome via Chromedriver capabilities. Based on this (pretty old) answer I tried the following: DesiredCapabilities capabilities = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); Map<String, Object> prefs = new HashMap<>(); // with this chrome still asks for permission prefs.put("profile.managed_default_content_settings.media_stream", 1); prefs.put("profile.managed_default_content_settings.media_stream