Examples of StateVertix


Examples of com.crawljax.core.state.StateVertix

   */
  private void goBackExact() throws CrawljaxException {
    /**
     * Thread safe
     */
    StateVertix curState = controller.getSession().getInitialState();

    for (Eventable clickable : backTrackPath) {

      if (!controller.getElementChecker().checkCrawlCondition(getBrowser())) {
        return;
View Full Code Here

Examples of com.crawljax.core.state.StateVertix

    this.handleInputElements(eventable);

    LOGGER.info("Executing " + eventable.getEventType() + " on element: " + eventable
            + "; State: " + this.getStateMachine().getCurrentState().getName());
    if (this.fireEvent(eventable)) {
      StateVertix newState =
              new StateVertix(getBrowser().getCurrentUrl(), controller.getSession()
                      .getStateFlowGraph().getNewStateName(), getBrowser().getDom(),
                      this.controller.getStrippedDom(getBrowser()));

      if (isDomChanged(this.getStateMachine().getCurrentState(), newState)) {
        // Dom is changed, so data might need be filled in again
View Full Code Here

Examples of com.crawljax.core.state.StateVertix

  private ClickResult crawlAction(CandidateCrawlAction action) throws CrawljaxException {
    CandidateElement candidateElement = action.getCandidateElement();
    EventType eventType = action.getEventType();

    StateVertix orrigionalState = this.getStateMachine().getCurrentState();

    if (candidateElement.allConditionsSatisfied(getBrowser())) {
      ClickResult clickResult = clickTag(new Eventable(candidateElement, eventType));
      switch (clickResult) {
        case cloneDetected:
View Full Code Here

Examples of com.crawljax.core.state.StateVertix

    if (!checkConstraints()) {
      return false;
    }

    // Store the currentState to be able to 'back-track' later.
    StateVertix orrigionalState = this.getStateMachine().getCurrentState();

    if (orrigionalState.searchForCandidateElements(candidateExtractor, configurationReader
            .getTagElements(), configurationReader.getExcludeTagElements(),
            configurationReader.getCrawlSpecificationReader().getClickOnce())) {
      // Only execute the preStateCrawlingPlugins when it's the first time
      LOGGER.info("Starting preStateCrawlingPlugins...");
      CrawljaxPluginsUtil.runPreStateCrawlingPlugins(controller.getSession(),
              orrigionalState.getUnprocessedCandidateElements());
    }

    CandidateCrawlAction action =
            orrigionalState.pollCandidateCrawlAction(this, crawlQueueManager);
    while (action != null) {
      if (depthLimitReached(depth)) {
        return true;
      }

      if (!checkConstraints()) {
        return false;
      }
      ClickResult result = this.crawlAction(action);
      orrigionalState.finishedWorking(this, action);
      switch (result) {
        case newState:
          return newStateDetected(orrigionalState);
        case cloneDetected:
          return true;
        default:
          break;
      }
      action = orrigionalState.pollCandidateCrawlAction(this, crawlQueueManager);
    }
    return true;
  }
View Full Code Here

Examples of com.crawljax.core.state.StateVertix

          CrawlSession session, final List<Eventable> exactEventPaths,
          final StateMachine stateMachine) {
    LOGGER.info("Running GuidedCrawlingPlugins...");
    for (Plugin plugin : CrawljaxPluginsUtil.PLUGINS) {
      if (plugin instanceof GuidedCrawlingPlugin) {
        StateVertix currentState = session.getCurrentState();
        ((GuidedCrawlingPlugin) plugin).guidedCrawling(
                currentState, controller, session, exactEventPaths, stateMachine);
      }
    }
  }
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.