Package com.crawljax.core.configuration.CrawljaxConfiguration

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


        assertNotNull(currentState);
      }
    });

    config = builder.build();
    controller = new CrawljaxRunner(config);
    session = controller.call();

    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < plugins.size(); i++) {
View Full Code Here


              List<Eventable> pathToFailure) {
        hits.incrementAndGet();
      }
    });

    controller = new CrawljaxRunner(builder.build());
  }

  @Test
  public void testFireEventFaildHasBeenExecuted() throws CrawljaxException {
    controller.call();
View Full Code Here

        LOG.error("\n\n!!! Invariant {} violated !!!\n", invariant);
      }

    });

    CrawljaxRunner crawljax = new CrawljaxRunner(builder.build());
    crawljax.call();
  }
}
View Full Code Here

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

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

  }

  private static InputSpecification getInputSpecification() {
View Full Code Here

      @Override
      public String toString() {
        return "Our example plugin";
      }
    });
    CrawljaxRunner crawljax = new CrawljaxRunner(builder.build());
    crawljax.call();
  }
}
View Full Code Here

  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

  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()
            .size());
View Full Code Here

    String url = "http://localhost:" + port + "/infinite.html";
    CrawljaxConfigurationBuilder builder =
            CrawljaxConfiguration.builderFor(url);
    builder.setMaximumStates(3);
    builder.setBasicAuth(USERNAME, PASSWORD);
    CrawlSession session = new CrawljaxRunner(builder.build()).call();

    assertThat(session.getStateFlowGraph(), hasStates(3));
  }

  @After
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.