Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

RenderedHtml

class RenderedHtml

An immutable semantic snapshot parsed from retained HTML.

Queries inspect rendered markup, not browser properties or successful form controls. Each query is isolated from other queries, including Jsoup selectors that modify their working document. Snapshots and selected elements have no live-view, HTTP, or scope ownership.

Defined by scalive.testing.RenderedHtml. View source (scalive/testing/src/scalive/testing/RenderedHtml.scala:22-59)

Methods2

selectAll

def selectAll(selector: String): Either[testing.HtmlQueryError, Vector[testing.RenderedElement]]

Selects all matching elements in Jsoup document order; no matches produce an empty vector.

Invalid selectors, including empty and blank selectors, produce InvalidSelector. The results contain immutable values, not references to mutable Jsoup elements.

Defined by scalive.testing.RenderedHtml.selectAll. View source (scalive/testing/src/scalive/testing/RenderedHtml.scala:43-58)

selectOne

def selectOne(selector: String): Either[testing.HtmlQueryError, testing.RenderedElement]

Selects exactly one element, reporting missing or ambiguous matches explicitly.

Defined by scalive.testing.RenderedHtml.selectOne. View source (scalive/testing/src/scalive/testing/RenderedHtml.scala:30-35)

Values2

html

val html: String

Defined by scalive.testing.RenderedHtml.html. View source (scalive/testing/src/scalive/testing/RenderedHtml.scala:24-24)

text

val text: String

The parsed document's decoded, combined text with whitespace normalized by Jsoup.

Defined by scalive.testing.RenderedHtml.text. View source (scalive/testing/src/scalive/testing/RenderedHtml.scala:27-27)