Guest User

Untitled

a guest
Apr 24th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. CHROME {
  2. public RemoteWebDriver getWebDriverObject(DesiredCapabilities capabilities) {
  3. HashMap<String, Object> chromePreferences = new HashMap<>();
  4. chromePreferences.put("profile.password_manager_enabled", false);
  5. chromePreferences.put("download.default_directory", "target/downloads/");
  6. chromePreferences.put("disable-popup-blocking", "true");
  7. ChromeOptions options = new ChromeOptions();
  8. options.merge(capabilities);
  9. options.addArguments("--no-default-browser-check");
  10. options.addArguments("--start-maximized");
  11. options.setExperimentalOption("prefs", chromePreferences);
  12.  
  13. return new ChromeDriver(options);
  14. }
Add Comment
Please, Sign In to add comment