Package com.crawljax.core.configuration

Examples of com.crawljax.core.configuration.CrawlRules$CrawlRulesBuilder


  public CandidateElementExtractor(ExtractorManager checker, @Assisted EmbeddedBrowser browser,
          FormHandler formHandler, CrawljaxConfiguration config) {
    checkedElements = checker;
    this.browser = browser;
    this.formHandler = formHandler;
    CrawlRules rules = config.getCrawlRules();
    PreCrawlConfiguration preCrawlConfig = rules.getPreCrawlConfig();
    this.excludeCrawlElements = asMultiMap(preCrawlConfig.getExcludedElements());
    this.includedCrawlElements =
            ImmutableList
                    .<CrawlElement> builder()
                    .addAll(preCrawlConfig.getIncludedElements())
                    .addAll(rules.getInputSpecification().getCrawlElements())
                    .build();

    crawlFrames = rules.shouldCrawlFrames();
    clickOnce = rules.isClickOnce();
    ignoredFrameIdentifiers = rules.getIgnoredFrameIdentifiers();
  }
View Full Code Here


  public CandidateElementExtractor(ExtractorManager checker, @Assisted EmbeddedBrowser browser,
          FormHandler formHandler, CrawljaxConfiguration config) {
    checkedElements = checker;
    this.browser = browser;
    this.formHandler = formHandler;
    CrawlRules rules = config.getCrawlRules();
    PreCrawlConfiguration preCrawlConfig = rules.getPreCrawlConfig();
    this.excludeCrawlElements = asMultiMap(preCrawlConfig.getExcludedElements());
    this.includedCrawlElements =
            ImmutableList
                    .<CrawlElement> builder()
                    .addAll(preCrawlConfig.getIncludedElements())
                    .addAll(rules.getInputSpecification().getCrawlElements())
                    .build();

    crawlFrames = rules.shouldCrawlFrames();
    clickOnce = rules.isClickOnce();
    ignoredFrameIdentifiers = rules.getIgnoredFrameIdentifiers();
  }
View Full Code Here

  public CandidateElementExtractor(ExtractorManager checker, @Assisted EmbeddedBrowser browser,
          FormHandler formHandler, CrawljaxConfiguration config) {
    checkedElements = checker;
    this.browser = browser;
    this.formHandler = formHandler;
    CrawlRules rules = config.getCrawlRules();
    PreCrawlConfiguration preCrawlConfig = rules.getPreCrawlConfig();
    this.excludeCrawlElements = asMultiMap(preCrawlConfig.getExcludedElements());
    this.includedCrawlElements = ImmutableList.<CrawlElement> builder()
            .addAll(preCrawlConfig.getIncludedElements())
            .addAll(rules.getInputSpecification().getCrawlElements())
            .build();
    crawlFrames = rules.shouldCrawlFrames();
    clickOnce = rules.isClickOnce();
    randomizeElementsOrder = rules.isRandomizeCandidateElements();
    ignoredFrameIdentifiers = rules.getIgnoredFrameIdentifiers();
    followExternalLinks = rules.followExternalLinks();
    siteHostName = config.getUrl().getHost();
  }
View Full Code Here

    assertThat(configForArgs("-a").getCrawlRules().isCrawlHiddenAnchors(), is(true));
  }

  @Test
  public void testCustomClicks() {
    CrawlRules crawlRules = configForArgs("--click a,b,c").getCrawlRules();
    ImmutableList<CrawlElement> includedElements =
            crawlRules.getPreCrawlConfig().getIncludedElements();
    assertThat(includedElements, hasSize(3));
  }
View Full Code Here

            is(TimeUnit.MINUTES.toMillis(123)));
  }

  @Test
  public void testWaitAfterReload() {
    CrawlRules crawlRules =
            configForArgs("-" + ParameterInterpeter.WAIT_AFTER_RELOAD + " 123")
                    .getCrawlRules();
    assertThat(crawlRules.getWaitAfterReloadUrl(), is(123L));
  }
View Full Code Here

    assertThat(crawlRules.getWaitAfterReloadUrl(), is(123L));
  }

  @Test
  public void testWaitAfterEvent() {
    CrawlRules crawlRules =
            configForArgs("-" + ParameterInterpeter.WAIT_AFTER_EVENT + " 123")
                    .getCrawlRules();
    assertThat(crawlRules.getWaitAfterEvent(), is(123L));
  }
View Full Code Here

  public CandidateElementExtractor(ExtractorManager checker, @Assisted EmbeddedBrowser browser,
          FormHandler formHandler, CrawljaxConfiguration config) {
    checkedElements = checker;
    this.browser = browser;
    this.formHandler = formHandler;
    CrawlRules rules = config.getCrawlRules();
    PreCrawlConfiguration preCrawlConfig = rules.getPreCrawlConfig();
    this.excludeCrawlElements = asMultiMap(preCrawlConfig.getExcludedElements());
    this.includedCrawlElements = ImmutableList.<CrawlElement> builder()
            .addAll(preCrawlConfig.getIncludedElements())
            .addAll(rules.getInputSpecification().getCrawlElements())
            .build();
    crawlFrames = rules.shouldCrawlFrames();
    clickOnce = rules.isClickOnce();
    randomizeElementsOrder = rules.isRandomizeCandidateElements();
    ignoredFrameIdentifiers = rules.getIgnoredFrameIdentifiers();
    followExternalLinks = rules.followExternalLinks();
    siteHostName = config.getUrl().getHost();
  }
View Full Code Here

  public CandidateElementExtractor(ExtractorManager checker, @Assisted EmbeddedBrowser browser,
          FormHandler formHandler, CrawljaxConfiguration config) {
    checkedElements = checker;
    this.browser = browser;
    this.formHandler = formHandler;
    CrawlRules rules = config.getCrawlRules();
    PreCrawlConfiguration preCrawlConfig = rules.getPreCrawlConfig();
    this.excludeCrawlElements = asMultiMap(preCrawlConfig.getExcludedElements());
    this.includedCrawlElements =
            ImmutableList
                    .<CrawlElement> builder()
                    .addAll(preCrawlConfig.getIncludedElements())
                    .addAll(rules.getInputSpecification().getCrawlElements())
                    .build();

    crawlFrames = rules.shouldCrawlFrames();
    clickOnce = rules.isClickOnce();
    ignoredFrameIdentifiers = rules.getIgnoredFrameIdentifiers();
  }
View Full Code Here

TOP

Related Classes of com.crawljax.core.configuration.CrawlRules$CrawlRulesBuilder

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.