Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CHROME {
- public RemoteWebDriver getWebDriverObject(DesiredCapabilities capabilities) {
- HashMap<String, Object> chromePreferences = new HashMap<>();
- chromePreferences.put("profile.password_manager_enabled", false);
- chromePreferences.put("download.default_directory", "target/downloads/");
- chromePreferences.put("disable-popup-blocking", "true");
- ChromeOptions options = new ChromeOptions();
- options.merge(capabilities);
- options.addArguments("--no-default-browser-check");
- options.addArguments("--start-maximized");
- options.setExperimentalOption("prefs", chromePreferences);
- return new ChromeDriver(options);
- }
Add Comment
Please, Sign In to add comment