AutomationIdentifier.ProgrammaticName Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the registered programmatic name.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationTypes (in UIAutomationTypes.dll)

public string ProgrammaticName { get; }

Property Value

Type: System.String

The programmatic name.

ProgrammaticName is intended for debugging and diagnostic purposes only. The string is not localized.

This property should not be used in string comparisons. To determine if two properties are the same, compare the property identifiers directly.

The following example displays the programmatic name of each property supported by an AutomationElement.

AutomationProperty[] properties = element.GetSupportedProperties();
foreach (AutomationProperty prop in properties)
{
    Console.WriteLine(prop.ProgrammaticName);
    Console.WriteLine(Automation.PropertyName(prop));
}

.NET Framework
Available since 3.0
Return to top
Show: