filterAttributes, crawlWaitEvent, crawlWaitReload);
}
private EmbeddedBrowser newChromeBrowser(ImmutableSortedSet<String> filterAttributes,
long crawlWaitReload, long crawlWaitEvent) {
ChromeDriver driverChrome;
if (configuration.getProxyConfiguration() != null
&& configuration.getProxyConfiguration().getType() != ProxyType.NOTHING) {
ChromeOptions optionsChrome = new ChromeOptions();
String lang = configuration.getBrowserConfig().getLangOrNull();
if (!Strings.isNullOrEmpty(lang)) {
optionsChrome.setExperimentalOptions("intl.accept_languages", lang);
}
optionsChrome.addArguments("--proxy-server=http://"
+ configuration.getProxyConfiguration().getHostname() + ":"
+ configuration.getProxyConfiguration().getPort());
driverChrome = new ChromeDriver(optionsChrome);
} else {
driverChrome = new ChromeDriver();
}
return WebDriverBackedEmbeddedBrowser.withDriver(driverChrome, filterAttributes,
crawlWaitEvent, crawlWaitReload);
}