Docs (4.0.0)
class OutputAssertion method

getSingleView

Returns the view object that rendered the currently matched output element, if there’s only one.

getSingleView<TView extends View>(type: ViewClass<TView>): TView

Errors

  • This method throws an error if the current selection consists of more than one element, or none at all.

Related

  • class OutputAssertionA class that provides assertion methods to be applied to a selection of rendered output elements.