Package com.crawljax.crawljax_plugins_plugin

Source Code of com.crawljax.crawljax_plugins_plugin.SimpleInputSiteCrawl

package com.crawljax.crawljax_plugins_plugin;

import com.crawljax.core.configuration.InputField;
import com.crawljax.core.configuration.InputSpecification;

/**
* Wraps a Crawljax instance the crawls the simplesite.
*/
public class SimpleInputSiteCrawl extends SampleCrawler {

  public static final int NUMBER_OF_STATES = 2;
  public static final int NUMBER_OF_EDGES = 1;

  public SimpleInputSiteCrawl() {
    super("simple-input-site");
  }

  @Override
  public void setup() throws Exception {
    super.setup();
    getCrawlSpec().setInputSpecification(getInputSpecification());
  }

  /**
   * @return The {@link InputSpecification} for the input box in this crawl session. You can
   *         override this methods to add more values. By default, it loads with two bad strings,
   *         and one good string.
   */
  public InputSpecification getInputSpecification() {
    InputSpecification inputSpecification = new InputSpecification();
    InputField field = inputSpecification.field("input");
    field.setValue("Good input");
    field.setValue("This doesnt work");
    field.setValue("Neither does this");

    return inputSpecification;
  }

}
TOP

Related Classes of com.crawljax.crawljax_plugins_plugin.SimpleInputSiteCrawl

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.