Share via


AutomationProperties.AutomationIdProperty Property

Definition

Identifies the AutomationProperties.AutomationId attached property, which is a string containing the UI Automation identifier (ID) for the automation element.

public:
 static property DependencyProperty ^ AutomationIdProperty { DependencyProperty ^ get(); };
static DependencyProperty AutomationIdProperty();
public static DependencyProperty AutomationIdProperty { get; }
var dependencyProperty = AutomationProperties.automationIdProperty;
Public Shared ReadOnly Property AutomationIdProperty As DependencyProperty

Property Value

The identifier for the AutomationProperties.AutomationId attached property.

Remarks

When it is available, the AutomationId of an element must be the same in any instance of the application, regardless of the local language. The value should be unique among sibling elements, but not necessarily unique across the entire desktop. For example, multiple instances of an application, or multiple folder views in Windows Explorer, can contain elements with the same AutomationId property, such as "SystemMenuBar".

Although support for AutomationId is always recommended for better automated testing support, this property is not mandatory. Where it is supported, AutomationId is useful for creating a test automation script that runs regardless of the UI language. Clients should make no assumptions regarding the AutomationId values exposed by other applications. AutomationId is not guaranteed to be stable across different releases or builds of an application.

Applies to