Skip to content

Commit

Permalink
[java] Passing ChromeOptions instead of plain capabilities to create …
Browse files Browse the repository at this point in the history
…a test Chrome driver
  • Loading branch information
barancev committed Jul 20, 2019
1 parent 76daf60 commit 791b361
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ private static ChromeDriverService getService() {
LOG.info("chromedriver will log to " + logFile);
service.start();
// Fugly.
Runtime.getRuntime().addShutdownHook(new Thread(() -> service.stop()));
Runtime.getRuntime().addShutdownHook(new Thread(service::stop));
return service;
} catch (IOException e) {
throw new RuntimeException(e);
}
}

private static Capabilities chromeWithCustomCapabilities(Capabilities originalCapabilities) {
private static ChromeOptions chromeWithCustomCapabilities(Capabilities originalCapabilities) {
ChromeOptions options = new ChromeOptions();
options.addArguments("disable-extensions", "disable-infobars", "disable-breakpad");
Map<String, Object> prefs = new HashMap<>();
Expand Down

0 comments on commit 791b361

Please sign in to comment.