Skip to content

SemanticNode

Namespace: E2E.Engine

public sealed class SemanticNode

One node of an observation tree. Ref is valid only for the observation it came from.

Inheritance: object

View source

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>

View source

public IReadOnlyList<SemanticNode> Children { get; init; }

Value: IReadOnlyList<SemanticNode>

View source

public string? InputPurpose { get; init; }

What a field takes: username, password, one-time-code, generic-secret, or none.

Value: string

View source

public int? Level { get; init; }

Value: int?

View source

public string? Name { get; init; }

The accessible name, by the accname rules Playwright follows, or null when the node has none.

Value: string

View source

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

View source

public string? Placeholder { get; init; }

Value: string

View source

public BoundingBox? Rect { get; init; }

The node’s box in viewport CSS pixels, when the platform measures one.

Value: BoundingBox

View source

public required string Ref { get; init; }

Value: string

View source

public string? Role { get; init; }

Value: string

View source

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

View source

public NodeStates States { get; init; }

Value: NodeStates

View source

public string? TestId { get; init; }

Value: string

View source

public string? Text { get; init; }

The rendered text, which locator reads and text queries use.

Value: string

View source

public string? Value { get; init; }

Value: string

View source