Package com.crawljax.condition

Examples of com.crawljax.condition.NotRegexCondition


  private static void addCrawlElements(CrawljaxConfigurationBuilder builder) {
    CrawlRulesBuilder rules = builder.crawlRules();
    rules.click("a");
    rules.click("div").withText(CLICK_TEXT);
    rules.click("div").underXPath("//SPAN[@id='" + CLICK_UNDER_XPATH_ID + "']");
    rules.click("button").when(new NotRegexCondition("DONT_CLICK_BUTTONS_ON_THIS_PAGE"));
    rules.click("div").withAttribute(ATTRIBUTE, "condition")
            .when(new RegexCondition("REGEX_CONDITION_TRUE"));

    rules.dontClick("a").withText(DONT_CLICK_TEXT);
    rules.dontClick("a").withAttribute(ATTRIBUTE, DONT_CLICK_TEXT);
View Full Code Here


            new OracleComparator("date", new DateComparator()));
  }

  private static void addCrawlConditions(CrawljaxConfigurationBuilder builder) {
    builder.crawlRules().addCrawlCondition("DONT_CRAWL_ME",
            new NotRegexCondition("DONT_CRAWL_ME"));
  }
View Full Code Here

          break;
        case regex:
          condition = new RegexCondition(c.getExpression());
          break;
        case notRegex:
          condition = new NotRegexCondition(c.getExpression());
          break;
        case visibleId:
          id = new Identification(How.id, c.getExpression());
          condition = new VisibleCondition(id);
          break;
View Full Code Here

  private static void addCrawlElements(CrawljaxConfigurationBuilder builder) {
    CrawlRulesBuilder rules = builder.crawlRules();
    rules.click("a");
    rules.click("div").withText(CLICK_TEXT);
    rules.click("div").underXPath("//SPAN[@id='" + CLICK_UNDER_XPATH_ID + "']");
    rules.click("button").when(new NotRegexCondition("DONT_CLICK_BUTTONS_ON_THIS_PAGE"));
    rules.click("div").withAttribute(ATTRIBUTE, "condition")
       .when(new RegexCondition("REGEX_CONDITION_TRUE"));

    rules.dontClick("a").withText(DONT_CLICK_TEXT);
    rules.dontClick("a").withAttribute(ATTRIBUTE, DONT_CLICK_TEXT);
View Full Code Here

      new OracleComparator("date", new DateComparator()));
  }

  private static void addCrawlConditions(CrawljaxConfigurationBuilder builder) {
    builder.crawlRules().addCrawlCondition("DONT_CRAWL_ME",
      new NotRegexCondition("DONT_CRAWL_ME"));
  }
View Full Code Here

    /**
     * Add a sample Invariant for testing the OnInvariantViolation plugin
     */
    builder.crawlRules().addInvariant("Never contain Final state S8",
            new NotRegexCondition("Final state S2"));

    builder.addPlugin(new PreCrawlingPlugin() {

      @Override
      public void preCrawling(CrawljaxConfiguration config) {
View Full Code Here

            CrawljaxConfiguration.builderFor("http://demo.crawljax.com/");

    // Add the invariant that checks that the string isn't present.
    builder.crawlRules().addInvariant(
            "Detect a string",
            new NotRegexCondition(
                    "Invariants can be used to perform tests on the current state"));

    // This plugin will just print the error.
    builder.addPlugin(new OnInvariantViolationPlugin() {
View Full Code Here

  private static void addCrawlElements(CrawljaxConfigurationBuilder builder) {
    CrawlRulesBuilder rules = builder.crawlRules();
    rules.click("a");
    rules.click("div").withText(CLICK_TEXT);
    rules.click("div").underXPath("//SPAN[@id='" + CLICK_UNDER_XPATH_ID + "']");
    rules.click("button").when(new NotRegexCondition("DONT_CLICK_BUTTONS_ON_THIS_PAGE"));
    rules.click("div").withAttribute(ATTRIBUTE, "condition")
            .when(new RegexCondition("REGEX_CONDITION_TRUE"));

    rules.dontClick("a").withText(DONT_CLICK_TEXT);
    rules.dontClick("a").withAttribute(ATTRIBUTE, DONT_CLICK_TEXT);
View Full Code Here

            new OracleComparator("date", new DateComparator()));
  }

  private static void addCrawlConditions(CrawljaxConfigurationBuilder builder) {
    builder.crawlRules().addCrawlCondition("DONT_CRAWL_ME",
            new NotRegexCondition("DONT_CRAWL_ME"));
  }
View Full Code Here

TOP

Related Classes of com.crawljax.condition.NotRegexCondition

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.