Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
Root *Node
}
Document represents a parsed HTML document.
func (*Document) FindByTestID ¶
FindByTestID finds the first element with the given data-testid.
type Node ¶
type Node struct {
Type html.NodeType
Tag string
Attrs map[string]string
Children []*Node
Text string
}
Node represents an HTML node.
func (*Node) FindByAttr ¶
FindByAttr finds the first element with the given attribute value.
func (*Node) TextContent ¶
TextContent returns the concatenated text content of the node and its descendants.
Click to show internal directories.
Click to hide internal directories.