GetAttribute(Control, String) Method

Definition

Assembly HeadlessTestingFramework.dll

Gets a standard attribute value from an element. Supports common attributes like: id, name, class, text, value, enabled, visible, etc.

public static string? GetAttribute(Control element, string attributeName)

Parameters

element
Avalonia.Controls.Control

The element to query.

attributeName
String

The attribute name.

Returns

String
The attribute value, or null if not found.