public class ChromeProxyConfig {
@Test
public void chromeProxyConfig() {
assumeThat(System.getProperty("webdriver.chrome.driver"), is(notNullValue()));
CrawlSession crawl =
new BaseCrawler(Resource.newClassPathResource("/site"),
"simplelink/simplelink.html") {
@Override
public CrawljaxConfigurationBuilder newCrawlConfigurationBuilder() {
CrawljaxConfigurationBuilder builder =
super.newCrawlConfigurationBuilder();
builder.setBrowserConfig(new BrowserConfiguration(BrowserType.CHROME));
return builder;
}
}.crawl();
assertThat(crawl.getStateFlowGraph(), hasStates(2));
}