Class/Object

net.ruippeixotog.scalascraper.browser

HtmlUnitBrowser

Related Docs: object HtmlUnitBrowser | package browser

Permalink

class HtmlUnitBrowser extends Browser

A Browser implementation based on HtmlUnit, a GUI-less browser for Java programs. HtmlUnitBrowser simulates thoroughly a web browser, executing JavaScript code in the pages besides parsing and modelling its HTML content. It supports several compatibility modes, allowing it to emulate browsers such as Internet Explorer.

Both the Document and the Element instances obtained from HtmlUnitBrowser can be mutated in the background. JavaScript code can at any time change attributes and the content of elements, reflected both in queries to Document and on previously stored references to Elements. The Document instance will always represent the current page in the browser's "window". This means the Document's location value can change, together with its root element, in the event of client-side page refreshes or redirections. However, Element instances belong to a fixed DOM tree and they stop being meaningful as soon as they are removed from the DOM or a client-side page reload occurs.

Linear Supertypes
Browser, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HtmlUnitBrowser
  2. Browser
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HtmlUnitBrowser(browserType: BrowserVersion = BrowserVersion.CHROME)

    Permalink

    browserType

    the browser type and version to simulate

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clearCookies(): Unit

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def closeAll(): Unit

    Permalink

    Closes all windows opened in this browser.

  8. def cookies(url: String): Map[String, String]

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  9. def defaultClientSettings(client: WebClient): Unit

    Permalink
    Attributes
    protected[this]
  10. def defaultRequestSettings(req: WebRequest): Unit

    Permalink
    Attributes
    protected[this]
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def exec(req: WebRequest): Document

    Permalink
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(url: String): Document

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def parseFile(file: File, charset: String): Document

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  23. def parseFile(path: String): Document

    Permalink
    Definition Classes
    Browser
  24. def parseFile(path: String, charset: String): Document

    Permalink
    Definition Classes
    Browser
  25. def parseFile(file: File): Document

    Permalink
    Definition Classes
    Browser
  26. def parseInputStream(inputStream: InputStream, charset: String): Document

    Permalink

    Closes the InputStream after reading

    Closes the InputStream after reading

    Definition Classes
    HtmlUnitBrowserBrowser
  27. def parseResource(name: String, charset: String = "UTF-8"): Document

    Permalink
    Definition Classes
    Browser
  28. def parseString(html: String): Document

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  29. def post(url: String, form: Map[String, String]): Document

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def userAgent: String

    Permalink
    Definition Classes
    HtmlUnitBrowserBrowser
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Browser

Inherited from AnyRef

Inherited from Any

Ungrouped