Package com.crawljax.core.configuration.CrawljaxConfiguration

Examples of com.crawljax.core.configuration.CrawljaxConfiguration.CrawljaxConfigurationBuilder.crawlRules()


  protected CrawljaxConfigurationBuilder setupConfig() {
    CrawljaxConfigurationBuilder builder =
            CrawljaxConfiguration.builderFor(WEB_SERVER.getSiteUrl().resolve("iframe"));
    builder.crawlRules().waitAfterEvent(100, TimeUnit.MILLISECONDS);
    builder.crawlRules().waitAfterReloadUrl(100, TimeUnit.MILLISECONDS);
    builder.setMaximumDepth(3);
    builder.crawlRules().click("a");
    builder.crawlRules().click("input");

    return builder;
View Full Code Here


    CrawljaxConfigurationBuilder builder =
            CrawljaxConfiguration.builderFor(WEB_SERVER.getSiteUrl().resolve("iframe"));
    builder.crawlRules().waitAfterEvent(100, TimeUnit.MILLISECONDS);
    builder.crawlRules().waitAfterReloadUrl(100, TimeUnit.MILLISECONDS);
    builder.setMaximumDepth(3);
    builder.crawlRules().click("a");
    builder.crawlRules().click("input");

    return builder;
  }
View Full Code Here

            CrawljaxConfiguration.builderFor(WEB_SERVER.getSiteUrl().resolve("iframe"));
    builder.crawlRules().waitAfterEvent(100, TimeUnit.MILLISECONDS);
    builder.crawlRules().waitAfterReloadUrl(100, TimeUnit.MILLISECONDS);
    builder.setMaximumDepth(3);
    builder.crawlRules().click("a");
    builder.crawlRules().click("input");

    return builder;
  }

  @Test
View Full Code Here

  }

  @Test
  public void testIframeExclusions() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();
    builder.crawlRules().dontCrawlFrame("frame1");
    builder.crawlRules().dontCrawlFrame("sub");
    builder.crawlRules().dontCrawlFrame("frame0");
    CrawljaxConfiguration config = builder.build();
    crawljax = new CrawljaxRunner(config);
    CrawlSession session = crawljax.call();
View Full Code Here

  @Test
  public void testIframeExclusions() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();
    builder.crawlRules().dontCrawlFrame("frame1");
    builder.crawlRules().dontCrawlFrame("sub");
    builder.crawlRules().dontCrawlFrame("frame0");
    CrawljaxConfiguration config = builder.build();
    crawljax = new CrawljaxRunner(config);
    CrawlSession session = crawljax.call();
    assertThat(session.getStateFlowGraph(), hasEdges(3));
View Full Code Here

  @Test
  public void testIframeExclusions() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();
    builder.crawlRules().dontCrawlFrame("frame1");
    builder.crawlRules().dontCrawlFrame("sub");
    builder.crawlRules().dontCrawlFrame("frame0");
    CrawljaxConfiguration config = builder.build();
    crawljax = new CrawljaxRunner(config);
    CrawlSession session = crawljax.call();
    assertThat(session.getStateFlowGraph(), hasEdges(3));
    assertThat(session.getStateFlowGraph(), hasStates(4));
View Full Code Here

  }

  @Test
  public void testIFramesNotCrawled() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();
    builder.crawlRules().crawlFrames(false);
    crawljax = new CrawljaxRunner(builder.build());
    CrawlSession session = crawljax.call();
    assertThat(session.getStateFlowGraph(), hasEdges(3));
    assertThat(session.getStateFlowGraph(), hasStates(4));
  }
View Full Code Here

  @Test
  public void testIFramesWildcardsNotCrawled() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();

    builder.crawlRules().dontCrawlFrame("frame%");
    builder.crawlRules().dontCrawlFrame("sub");
    crawljax = new CrawljaxRunner(builder.build());
    CrawlSession session = crawljax.call();
    assertThat(session.getStateFlowGraph(), hasEdges(3));
    assertThat(session.getStateFlowGraph(), hasStates(4));
View Full Code Here

  @Test
  public void testIFramesWildcardsNotCrawled() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();

    builder.crawlRules().dontCrawlFrame("frame%");
    builder.crawlRules().dontCrawlFrame("sub");
    crawljax = new CrawljaxRunner(builder.build());
    CrawlSession session = crawljax.call();
    assertThat(session.getStateFlowGraph(), hasEdges(3));
    assertThat(session.getStateFlowGraph(), hasStates(4));
  }
View Full Code Here

  }

  @Test
  public void testCrawlingOnlySubFrames() throws CrawljaxException {
    CrawljaxConfigurationBuilder builder = setupConfig();
    builder.crawlRules().dontCrawlFrame("frame1.frame10");
    crawljax = new CrawljaxRunner(builder.build());
    CrawlSession session = crawljax.call();
    assertEquals("Clickables", 12, session.getStateFlowGraph()
            .getAllEdges().size());
    assertEquals("States", 12, session.getStateFlowGraph().getAllStates()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.