Jaa


AutomationProperties.AutomationId Attached Property

Definition

Gets or sets the string that uniquely identifies the element to Microsoft UI Automation.

see GetAutomationId, and SetAutomationId
see GetAutomationId, and SetAutomationId
see GetAutomationId, and SetAutomationId

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

See also