Package com.crawljax.core

Examples of com.crawljax.core.CrawljaxRunner


  @Before
  public void setup() throws Exception {
    if (!HAS_RUN.get()) {
      HAS_RUN.set(true);
      CrawljaxRunner crawljax = null;
      crawljax = new CrawljaxRunner(getCrawljaxConfiguration());
      session = crawljax.call();
      HAS_FINISHED.set(true);
    } else {
      while (!HAS_FINISHED.get()) {
        LOG.debug("Waiting for crawl to finish...");
        Thread.sleep(500);
View Full Code Here


    builder.addPlugin(new SamplePlugin());

    builder.crawlRules().setInputSpec(getInputSpecification());

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

    }
  }

  private void runIfConfigured() {
    if (config != null) {
      CrawljaxRunner runner = new CrawljaxRunner(config);
      runner.call();
    }
  }
View Full Code Here

    CrawlRulesBuilder rules = builder.crawlRules();
    rules.dontClick("a").withAttribute("id", "noClickId");
    rules.dontClickChildrenOf("div").withClass("noChildrenOfClass");
    rules.dontClickChildrenOf("div").withId("noChildrenOfId");

    CrawlSession session = new CrawljaxRunner(builder.build()).call();

    assertThat(session.getStateFlowGraph(), hasStates(2));
  }
View Full Code Here

    }
    builder.addPlugin(new SamplePlugin(new HostInterfaceImpl(new File("out"), parameters)));

    builder.crawlRules().setInputSpec(getInputSpecification());

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

        };
      }
    });
    int depth = 3;

    CrawljaxRunner runner = new CrawljaxRunner(builder.setMaximumDepth(depth).build());
    CrawlSession session = runner.call();

    assertThat(session.getStateFlowGraph(), hasStates(1));
    assertThat(runner.getReason(), is(ExitNotifier.ExitStatus.EXHAUSTED));
  }
View Full Code Here

    }
  }

  private void runIfConfigured() {
    if (config != null) {
      CrawljaxRunner runner = new CrawljaxRunner(config);
      runner.call();
    }
  }
View Full Code Here

            record.getPlugins().put(pluginKey, plugin);
          }
        }

        // Build Crawljax
        CrawljaxRunner crawljax = new CrawljaxRunner(builder.build());

        // Set Timestamps
        timestamp = new Date();
        record.setStartTime(timestamp);
        record.setCrawlStatus(CrawlStatusType.running);
        crawlRecords.update(record);
        LogWebSocketServlet.sendToAll("run-" + Integer.toString(crawlId));

        // run Crawljax
        crawljax.call();

        // set duration
        long duration = (new Date()).getTime() - timestamp.getTime();
        config = configurations.findByID(record.getConfigurationId()); //Reload config in case it was edited during crawl execution
        config.setLastCrawl(timestamp);
View Full Code Here

    }
    builder.addPlugin(new TestPlugin(new HostInterfaceImpl(new File("out"), parameters)));

    builder.crawlRules().setInputSpec(getInputSpecification());

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

  @Before
  public void setup() throws Exception {
    if (!HAS_RUN.get()) {
      HAS_RUN.set(true);
      CrawljaxRunner crawljax = null;
      crawljax = new CrawljaxRunner(getCrawljaxConfiguration());
      session = crawljax.call();
      HAS_FINISHED.set(true);
    }
    else {
      while (!HAS_FINISHED.get()) {
        LOG.debug("Waiting for crawl to finish...");
View Full Code Here

TOP

Related Classes of com.crawljax.core.CrawljaxRunner

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.