Last active
December 10, 2015 20:59
-
-
Save cgravier/4491991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String, Object> contentSettings = new HashMap<String, Object>(); | |
contentSettings.put("images", 2); | |
contentSettings.put("plugins", 2); | |
contentSettings.put("popups", 2); | |
contentSettings.put("audio", 2); | |
Map<String, Object> preferences = new HashMap<String, Object>(); | |
preferences.put("profile.default_content_settings", contentSettings); | |
DesiredCapabilities caps = DesiredCapabilities.chrome(); | |
caps.setCapability("chrome.prefs", preferences); | |
driver = new RemoteWebDriver(service.getUrl(), caps); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment