Package com.crawljax.core.configuration

Examples of com.crawljax.core.configuration.BrowserConfiguration


        LogWebSocketServlet.sendToAll("init-" + Integer.toString(crawlId));

        // Build Configuration
        CrawljaxConfigurationBuilder builder =
                CrawljaxConfiguration.builderFor(config.getUrl());
        builder.setBrowserConfig(new BrowserConfiguration(config.getBrowser(), config
                .getNumBrowsers()));

        if (config.getMaxDepth() > 0)
          builder.setMaximumDepth(config.getMaxDepth());
        else
View Full Code Here


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

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

    builder.crawlRules().waitAfterReloadUrl(WAIT_TIME_AFTER_RELOAD, TimeUnit.MILLISECONDS);
    builder.crawlRules().waitAfterEvent(WAIT_TIME_AFTER_EVENT, TimeUnit.MILLISECONDS);

   
    // We want to use two browsers simultaneously.
    builder.setBrowserConfig(new BrowserConfiguration(BrowserType.FIREFOX, 1));

    CrawljaxRunner crawljax = new CrawljaxRunner(builder.build());
    crawljax.call();

  }
View Full Code Here

    bind(URI.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

                    "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));
  }
View Full Code Here

    CrawljaxConfigurationBuilder builder = CrawljaxConfiguration.builderFor(getUrl());
    builder.crawlRules().clickDefaultElements();
    builder.setUnlimitedRuntime();
    builder.setUnlimitedCrawlDepth();
    builder.addPlugin(new PostCrawlStateGraphChecker());
    builder.setBrowserConfig(new BrowserConfiguration(BrowserProvider.getBrowserType()));
    return builder;
  }
View Full Code Here

  public void whenRemoteBrowserSpecifiedWithUrlItResumes() {
    JarRunner runner =
            new JarRunner(defaultArgsPlus("-b " + BrowserType.REMOTE.name()
                    + " -" + ParameterInterpeter.BROWSER_REMOTE_URL + " localhost:9000"));
    assertThat(streams.getErrorOutput(), isEmptyString());
    BrowserConfiguration config = runner.getConfig().getBrowserConfig();
    assertThat(config.getBrowsertype(), is(BrowserType.REMOTE));
    assertThat(config.getRemoteHubUrl(), is("localhost:9000"));

  }
View Full Code Here

    new JarRunner(defaultArgs());
  }

  @Test
  public void testCustomBrowserConfig() {
    BrowserConfiguration config =
            configForArgs("-p 123 -b " + BrowserType.CHROME).getBrowserConfig();
    assertThat(config.getNumberOfBrowsers(), is(123));
    assertThat(config.getBrowsertype(), is(BrowserType.CHROME));
  }
View Full Code Here

    return port;
  }

  public CrawljaxConfigurationBuilder newConfigBuilder() {
    return CrawljaxConfiguration.builderFor(getSiteUrl())
                                .setBrowserConfig(new BrowserConfiguration(BrowserProvider.getBrowserType()));
  }
View Full Code Here

                                .setBrowserConfig(new BrowserConfiguration(BrowserProvider.getBrowserType()));
  }

  public CrawljaxConfigurationBuilder newConfigBuilder(String context) {
    return CrawljaxConfiguration.builderFor(getSiteUrl() + context)
                                .setBrowserConfig(new BrowserConfiguration(BrowserProvider.getBrowserType()));
  }
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.