public abstract class SampleCrawler extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
SampleCrawler(String siteExtension) |
| Modifier and Type | Method and Description |
|---|---|
com.crawljax.core.CrawlSession |
crawl()
Runs the crawler.
|
com.crawljax.core.configuration.CrawljaxConfiguration |
getConfig() |
com.crawljax.core.configuration.CrawlSpecification |
getCrawlSpec() |
WebServer |
getWebServer() |
void |
setup()
Starts the webserver, configures crawljax.
|
void |
showWebSite()
This starts the webserver and blocks the thread so you can inspect the site in your browser
manually.
|
protected SampleCrawler(String siteExtension)
public WebServer getWebServer()
public void setup()
throws Exception
crawl(). After this method completes, you can configure the
CrawlSpecification and the CrawljaxConfiguration using getConfig()
and getCrawlSpec().
The CrawlSpecification is configured with
CrawlSpecification.clickDefaultElements().
Exception - When the webserver fails to start.public com.crawljax.core.configuration.CrawljaxConfiguration getConfig()
public com.crawljax.core.configuration.CrawlSpecification getCrawlSpec()
public com.crawljax.core.CrawlSession crawl()
throws Exception
setup() it will do that before it runs.CrawlSession for post-crawl inspection.Exception - When crawljax isn't configured correctly or the webserver fails to stop.public void showWebSite()
throws Exception
This thread will block once started so you have to stop it manually, once you are done.
Exception - in case the webserver can't startCopyright © 2012. All Rights Reserved.