Package com.crawljax.test

Examples of com.crawljax.test.RunWithWebServer


  }

  @Test
  public void testExtractIframeContents() throws Exception {
    RunWithWebServer server = new RunWithWebServer("/site");
    server.before();
    CrawljaxConfigurationBuilder builder = CrawljaxConfiguration
            .builderFor(server.getSiteUrl().toExternalForm() + "iframe/");
    builder.crawlRules().click("a");
    CrawljaxConfiguration config = builder.build();

    CandidateElementExtractor extractor = newElementExtractor(config);
    browser.goToUrl(new URL(server.getSiteUrl().toExternalForm() + "iframe/"));
    List<CandidateElement> candidates = extractor.extract(DUMMY_STATE);

    for (CandidateElement e : candidates) {
      LOG.debug("candidate: " + e.getUniqueString());
    }

    server.after();

    assertNotNull(extractor);
    assertNotNull(candidates);
    assertThat(candidates, hasSize(9));
View Full Code Here


  }

  @Test
  public void testExtractIframeContents() throws Exception {
    RunWithWebServer server = new RunWithWebServer("/site");
    server.before();
    CrawljaxConfigurationBuilder builder = CrawljaxConfiguration
            .builderFor(server.getSiteUrl().resolve("iframe/"));
    builder.crawlRules().click("a");
    CrawljaxConfiguration config = builder.build();

    CandidateElementExtractor extractor = newElementExtractor(config);
    browser.goToUrl(server.getSiteUrl().resolve("iframe/"));
    List<CandidateElement> candidates = extractor.extract(DUMMY_STATE);

    for (CandidateElement e : candidates) {
      LOG.debug("candidate: " + e.getUniqueString());
    }

    server.after();

    assertNotNull(extractor);
    assertNotNull(candidates);
    assertThat(candidates, hasSize(9));
View Full Code Here

  }

  @Test
  public void testExtractIframeContents() throws Exception {
    RunWithWebServer server = new RunWithWebServer("/site");
    server.before();
    CrawljaxConfigurationBuilder builder =
            CrawljaxConfiguration
                    .builderFor(server.getSiteUrl().toExternalForm() + "iframe/");
    builder.crawlRules().click("a");
    CrawljaxConfiguration config = builder.build();

    CandidateElementExtractor extractor = newElementExtractor(config);
    browser.goToUrl(new URL(server.getSiteUrl().toExternalForm() + "iframe/"));
    List<CandidateElement> candidates = extractor.extract(DUMMY_STATE);

    for (CandidateElement e : candidates) {
      LOG.debug("candidate: " + e.getUniqueString());
    }

    server.after();

    assertNotNull(extractor);
    assertNotNull(candidates);
    assertThat(candidates, hasSize(9));
View Full Code Here

TOP

Related Classes of com.crawljax.test.RunWithWebServer

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.