SemanticNode
Namespace: E2E.Engine
public sealed class SemanticNodeOne node of an observation tree. Ref is valid only for the observation it came from.
Inheritance: object
Properties
Section titled “Properties”Attributes
Section titled “Attributes”public IReadOnlyDictionary<string, string> Attributes { get; init; }Platform attributes by name, what getAttribute and toHaveAttribute read.
A secure field never reports its value.
Value: IReadOnlyDictionary<string, string>
Children
Section titled “Children”public IReadOnlyList<SemanticNode> Children { get; init; }Value: IReadOnlyList<SemanticNode>
InputPurpose
Section titled “InputPurpose”public string? InputPurpose { get; init; }What a field takes: username, password, one-time-code, generic-secret, or none.
Value: string
public int? Level { get; init; }Value: int?
public string? Name { get; init; }The accessible name, by the accname rules Playwright follows, or null when the node has none.
Value: string
OwnText
Section titled “OwnText”public string? OwnText { get; init; }The text the node owns, read as a line: its inline words stay in place, but its listed children’s text is left out. The snapshot shows it. Null when the node has no split: Text then reads whole.
Value: string
Placeholder
Section titled “Placeholder”public string? Placeholder { get; init; }Value: string
public BoundingBox? Rect { get; init; }The node’s box in viewport CSS pixels, when the platform measures one.
Value: BoundingBox
public required string Ref { get; init; }Value: string
public string? Role { get; init; }Value: string
Selection
Section titled “Selection”public string? Selection { get; init; }The text selected inside the focused field or editing host. Null for a caret, an unfocused field, or a secure one.
Value: string
States
Section titled “States”public NodeStates States { get; init; }Value: NodeStates
TestId
Section titled “TestId”public string? TestId { get; init; }Value: string
public string? Text { get; init; }The rendered text, which locator reads and text queries use.
Value: string
public string? Value { get; init; }Value: string