DomSnapshot Class
Snapshots of DOM subtrees: their HTML formatted for comparisons, and their accessibility tree.
public static class DomSnapshotMethods
| Name | Description |
|---|---|
| GetAccessibilitySnapshot(IEnumerable<Node>) | Gets the accessibility tree of elements, as a YAML snapshot (the format of the ARIA snapshots of Playwright). |
| GetMarkup(IReadOnlyList<Node>, MarkupOptions?) | Gets the HTML of nodes, formatted for snapshots (see MarkupOptions). |
GetAccessibilitySnapshot(IEnumerable<Node>)
DomSnapshot.csGets the accessibility tree of elements, as a YAML snapshot (the format of the ARIA snapshots of Playwright).
public static string GetAccessibilitySnapshot(IEnumerable<Node> nodes)Parameters
nodesIEnumerable<Node>- The nodes; the nodes that are not elements are ignored.
Returns
string The snapshot.
GetMarkup(IReadOnlyList<Node>, MarkupOptions?)
DomSnapshot.csGets the HTML of nodes, formatted for snapshots (see MarkupOptions).
public static string GetMarkup(IReadOnlyList<Node> nodes, MarkupOptions? options = null)Parameters
nodesIReadOnlyList<Node>- The nodes.
optionsMarkupOptions?- The options, or null for the default options.
Returns
string The HTML.