Browse files

Made crawl part of the contract for the Crawler class, so that Crawle…

…r instances may generically just be told to 'crawl'.
  • Loading branch information...
1 parent 6509bc6 commit fa762ec37add9dab653c2b20b98689a1fe5d822e @bplawler committed Apr 6, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/scala/CrawlerDsl.scala
View
4 src/main/scala/CrawlerDsl.scala
@@ -280,7 +280,7 @@ class ScriptProcessor(c: Crawler, dType: DiscriminatorType)
* starting point for navigation, and it also provides most of the tokens
* that are part of the crawler DSL.
*/
-class Crawler(version: BrowserVersion = BrowserVersion.FIREFOX_3_6,
+abstract class Crawler(version: BrowserVersion = BrowserVersion.FIREFOX_3_6,
failOnJSError: Boolean = false) extends ElementProcessor
{
/**
@@ -391,6 +391,8 @@ class Crawler(version: BrowserVersion = BrowserVersion.FIREFOX_3_6,
*/
def configure(m: java.util.Map[String, String]) = { config = m }
+ def crawl
+
def navigateTo(url: String) = {
currentUrl = url
processBlock(this) _

0 comments on commit fa762ec

Please sign in to comment.