Package com.crawljax.condition

Examples of com.crawljax.condition.Condition


    StateVertex state2 = new StateVertexImpl(2, "state2", "<table><div>state2</div></table>");
    StateVertex state3 = new StateVertexImpl(3, "state3", "<table><div>state2</div></table>");

    hit = false;
    ImmutableList<Invariant> iList =
            ImmutableList.of(new Invariant("Test123", new Condition() {

              @Override
              public boolean check(EmbeddedBrowser browser) {
                hit = true;
                return false;
View Full Code Here


      @Override
      public void onInvariantViolation(Invariant invariant, CrawlerContext context) {
        hit = true;
      }
    });
    builder.crawlRules().addInvariant(new Invariant("Test123", new Condition() {

      @Override
      public boolean check(EmbeddedBrowser browser) {
        return false;
      }
View Full Code Here

        MDC.remove("crawl_record");
      }
    }

    private Condition getConditionFromConfig(com.crawljax.web.model.Condition c) {
      Condition condition = null;
      Identification id = null;
      switch (c.getCondition()) {
        case url:
          condition = new UrlCondition(c.getExpression());
          break;
View Full Code Here

            conditionsSucceed = false;
            break;
          }
        }
        if (conditionsSucceed) {
          Condition invariantCondition = invariant.getCondition();
          LOGGER.debug("Checking Invariant: " + invariant.getDescription());
          if (!invariantCondition.check(browser)) {
            LOGGER.debug("Invariant '" + invariant.getDescription() + "' failed: "
                    + invariant.getDescription());
            failedInvariants.add(invariant);
          }
        }
View Full Code Here

            conditionsSucceed = false;
            break;
          }
        }
        if (conditionsSucceed) {
          Condition condition = crawlCondition.getCondition();
          // LOGGER.info("Checking Crawl Condition "
          // + crawlCondition.getClass().getSimpleName() + ": "
          // + crawlCondition.getDescription());
          if (!condition.check(browser)) {
            LOGGER.info("CrawlCondition failed: " + crawlCondition.getDescription());
            failedCrawlConditions.add(crawlCondition);
            return false;
          }
        }
View Full Code Here

    StateVertex state2 = new StateVertexImpl(2, "state2", "<table><div>state2</div></table>");
    StateVertex state3 = new StateVertexImpl(3, "state3", "<table><div>state2</div></table>");

    hit = false;
    ImmutableList<Invariant> iList =
            ImmutableList.of(new Invariant("Test123", new Condition() {

              @Override
              public boolean check(EmbeddedBrowser browser) {
                hit = true;
                return false;
View Full Code Here

      @Override
      public void onInvariantViolation(Invariant invariant, CrawlerContext context) {
        hit = true;
      }
    });
    builder.crawlRules().addInvariant(new Invariant("Test123", new Condition() {

      @Override
      public boolean check(EmbeddedBrowser browser) {
        return false;
      }
View Full Code Here

            conditionsSucceed = false;
            break;
          }
        }
        if (conditionsSucceed) {
          Condition invariantCondition = invariant.getCondition();
          LOGGER.debug("Checking Invariant: " + invariant.getDescription());
          if (!invariantCondition.check(browser)) {
            LOGGER.debug("Invariant '" + invariant.getDescription() + "' failed: "
                    + invariant.getDescription());
            failedInvariants.add(invariant);
          }
        }
View Full Code Here

            conditionsSucceed = false;
            break;
          }
        }
        if (conditionsSucceed) {
          Condition condition = crawlCondition.getCondition();
          // LOGGER.info("Checking Crawl Condition "
          // + crawlCondition.getClass().getSimpleName() + ": "
          // + crawlCondition.getDescription());
          if (!condition.check(browser)) {
            LOGGER.info("CrawlCondition failed: " + crawlCondition.getDescription());
            failedCrawlConditions.add(crawlCondition);
            return false;
          }
        }
View Full Code Here

            conditionsSucceed = false;
            break;
          }
        }
        if (conditionsSucceed) {
          Condition invariantCondition = invariant.getCondition();
          LOGGER.debug("Checking Invariant: " + invariant.getDescription());
          if (!invariantCondition.check(browser)) {
            LOGGER.debug("Invariant '" + invariant.getDescription() + "' failed: "
                    + invariant.getDescription());
            failedInvariants.add(invariant);
          }
        }
View Full Code Here

TOP

Related Classes of com.crawljax.condition.Condition

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.