class Bezel::Testing::Node
An element of a Testing::Doc (or its root, without a tag), or a text.
Constants
HIDDEN: Array[String]
Elements whose text is no part of the page's.
BLOCKS: Array[String]
Elements that begin a line of text.
Class methods
def self.squish(text: String) -> String
text with runs of whitespace as one space, trimmed.
Methods
def tag -> String
The tag in lowercase ("" for the root and for a text).
def attrs -> Hash[String, String]
The attributes, names in lowercase.
def attr(name: String) -> String?
The attribute name, or nil.
def children -> Array[Bezel::Testing::Node]
The child elements and texts.
def text? -> Bool
Whether this is a text.
def classes -> Array[String]
The classes of the class attribute.
def text -> String
The text inside, whitespace collapsed: inline elements joined as
they are (Hello, <b>Ann</b>! is Hello, Ann!), block elements
apart; script, style, template and title inside leave theirs
out (the element's own text gives it).
def select(selector: String) -> Array[Bezel::Testing::Node]
The elements under this one selector matches, in document order.
def descendants -> Array[Bezel::Testing::Node]
The elements under this one, in document order.