Package com.crawljax.core.configuration

Examples of com.crawljax.core.configuration.BrowserConfiguration


    bind(URL.class).annotatedWith(BaseUrl.class).toInstance(config.getUrl());
    bind(CrawljaxConfiguration.class).toInstance(config);
    bind(CrawlRules.class).toInstance(config.getCrawlRules());
    bind(ProxyConfiguration.class).toInstance(config.getProxyConfiguration());

    BrowserConfiguration browserConfig = config.getBrowserConfig();
    bind(BrowserConfiguration.class).toInstance(browserConfig);

    if (browserConfig.isDefaultBuilder()) {
      bind(EmbeddedBrowser.class).toProvider(WebDriverBrowserBuilder.class);
    } else {
      bind(EmbeddedBrowser.class).toProvider(
              Providers.guicify(browserConfig.getBrowserBuilder()));
    }
  }
View Full Code Here


            notNullValue());
  }

  @Override
  BrowserConfiguration getBrowserConfiguration() {
    return new BrowserConfiguration(BrowserType.PHANTOMJS, 1);
  }
View Full Code Here

    bind(CrawljaxConfiguration.class).toInstance(config);
    bind(CrawlRules.class).toInstance(config.getCrawlRules());
    bind(ProxyConfiguration.class).toInstance(config.getProxyConfiguration());
    bind(Plugins.class).toInstance(config.getPlugins());

    BrowserConfiguration browserConfig = config.getBrowserConfig();
    bind(BrowserConfiguration.class).toInstance(browserConfig);

    if (browserConfig.isDefaultBuilder()) {
      bind(EmbeddedBrowser.class).toProvider(WebDriverBrowserBuilder.class);
    } else {
      bind(EmbeddedBrowser.class).toProvider(
              Providers.guicify(browserConfig.getBrowserBuilder()));
    }
  }
View Full Code Here

    int browsers = 1;
    if (options.specifiesParallelBrowsers()) {
      browsers = options.getSpecifiedNumberOfBrowsers();
    }
    builder.setBrowserConfig(new BrowserConfiguration(browser, browsers));

    if (options.specifiesDepth()) {
      builder.setMaximumDepth(options.getSpecifiedDepth());
    }
View Full Code Here

    } else if (result instanceof Plugin) {
      return escapeHtml(result.getClass().getSimpleName());
    } else if (result instanceof CrawlRules) {
      return "<pre><code>" + escapeHtml(Serializer.toPrettyJson(result)) + "</code></pre>";
    } else if (result instanceof BrowserConfiguration) {
      BrowserConfiguration config = (BrowserConfiguration) result;
      StringBuilder configAsString =
              new StringBuilder().append(config.getNumberOfBrowsers())
                      .append(" browsers of type ")
                      .append(config.getBrowsertype());
      if (!(config.getBrowserBuilder() instanceof WebDriverBrowserBuilder)) {
        configAsString.append(" using builder ").append(config.getBrowserBuilder());
      }
      return configAsString.toString();
    } else if (result instanceof Plugins) {
      return toString(((Plugins) result).pluginNames());
    } else if (result instanceof Number && ((Number) result).intValue() == 0) {
View Full Code Here

    assumeThat(System.getProperty("os.name").toLowerCase(), containsString("windows"));
  }

  @Override
  BrowserConfiguration getBrowserConfiguration() {
    return new BrowserConfiguration(BrowserType.INTERNET_EXPLORER);
  }
View Full Code Here

    }
    if (browser == BrowserType.REMOTE) {
      String remoteUrl = options.getSpecifiedRemoteBrowser();
      builder.setBrowserConfig(BrowserConfiguration.remoteConfig(browsers, remoteUrl));
    } else {
      builder.setBrowserConfig(new BrowserConfiguration(browser, browsers));
    }

    if (options.specifiesDepth()) {
      builder.setMaximumDepth(options.getSpecifiedDepth());
    }
View Full Code Here

@Category(BrowserTest.class)
public class LargePhantomJSTest extends LargeTestBase {

  @Override
  BrowserConfiguration getBrowserConfiguration() {
    return new BrowserConfiguration(BrowserType.PHANTOMJS, 1);
  }
View Full Code Here

    CrawljaxConfiguration config =
            CrawljaxConfiguration
                    .builderFor("http://example.com")
                    .addPlugin(postCrawlPlugin)
                    .setBrowserConfig(
                            new BrowserConfiguration(BrowserType.FIREFOX, consumers))
                    .build();

    candidateActions =
            new UnfiredCandidateActions(config.getBrowserConfig(), graphProvider,
                    new MetricRegistry());
View Full Code Here

    }
  }

  @Override
  BrowserConfiguration getBrowserConfiguration() {
    return new BrowserConfiguration(BrowserType.CHROME);
  }
View Full Code Here

TOP

Related Classes of com.crawljax.core.configuration.BrowserConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.