Package com.crawljax.core.state

Examples of com.crawljax.core.state.CrawlPath


  /**
   * branch the current crawl path, save the old-one and continue with the current.
   */
  protected final void branchCrawlPath() {
    CrawlPath path = crawlPath.get();
    if (path == null) {
      return;
    }
    this.addCrawlPath(path.immutableCopy(false));
  }
View Full Code Here


   *
   * @param clickable
   *            the clickable to add to the current path.
   */
  protected final void addEventableToCrawlPath(Eventable clickable) {
    CrawlPath path = crawlPath.get();
    if (path == null) {
      path = startNewPath();
    }
    path.add(clickable);
  }
View Full Code Here

   * Get the current crawl path.
   *
   * @return the current current crawl path.
   */
  public CrawlPath getCurrentCrawlPath() {
    CrawlPath path = this.crawlPath.get();
    if (path == null) {
      return new CrawlPath();
    }
    return path;
  }
View Full Code Here

   * of on the Crawler, so without (re)starting a new Path the old path continues.
   *
   * @return the new empty path.
   */
  protected final CrawlPath startNewPath() {
    CrawlPath path = new CrawlPath();
    crawlPath.set(path);
    crawlPaths.add(path);
    return path;
  }
View Full Code Here

    }
    stateMachine =
            new StateMachine(graphProvider.get(),
                    crawlRules.getInvariants(), plugins, stateComparator);
    context.setStateMachine(stateMachine);
    crawlpath = new CrawlPath();
    context.setCrawlPath(crawlpath);
    browser.goToUrl(url);
    plugins.runOnUrlLoadPlugins(context);
    crawlDepth.set(0);
  }
View Full Code Here

    return waitTime;
  }

  private void goBackOneState() {
    LOG.debug("Going back one state");
    CrawlPath currentPath = crawlpath.immutableCopy();
    crawlpath = null;
    StateVertex current = stateMachine.getCurrentState();
    reset();
    follow(currentPath, current);
  }
View Full Code Here

    }
    stateMachine =
            new StateMachine(graphProvider.get(),
                    crawlRules.getInvariants(), plugins, stateComparator);
    context.setStateMachine(stateMachine);
    crawlpath = new CrawlPath();
    browser.goToUrl(url);
    plugins.runOnUrlLoadPlugins(context);
    crawlDepth.set(0);
  }
View Full Code Here

    return waitTime;
  }

  private void goBackOneState() {
    LOG.debug("Going back one state");
    CrawlPath currentPath = crawlpath.immutableCopy();
    crawlpath = null;
    StateVertex current = stateMachine.getCurrentState();
    reset();
    follow(currentPath, current);
  }
View Full Code Here

   *            the event path up till this moment.
   * @param name
   *            a name for this crawler (default is empty).
   */
  public Crawler(CrawljaxController mother, List<Eventable> exactEventPath, String name) {
    this(mother, new CrawlPath(exactEventPath));
    this.name = name;
  }
View Full Code Here

   *            the path used to return to the last state, this can be a empty list
   * @deprecated better to use {@link #Crawler(CrawljaxController, CrawlPath)}
   */
  @Deprecated
  protected Crawler(CrawljaxController mother, List<Eventable> returnPath) {
    this(mother, new CrawlPath(returnPath));
  }
View Full Code Here

TOP

Related Classes of com.crawljax.core.state.CrawlPath

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.