Examples of CrawlRules


Examples of com.crawljax.core.configuration.CrawlRules

  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

Examples of com.crawljax.core.configuration.CrawlRules

  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

Examples of com.crawljax.core.configuration.CrawlRules

  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

Examples of com.crawljax.core.configuration.CrawlRules

    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

Examples of com.crawljax.core.configuration.CrawlRules

            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

Examples of com.crawljax.core.configuration.CrawlRules

    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

Examples of com.crawljax.core.configuration.CrawlRules

  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

Examples of com.crawljax.core.configuration.CrawlRules

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