Export (0) Print
Expand All

AutomationElement Class

Represents a UI Automation element in the UI Automation tree, and contains values used as identifiers by UI Automation client applications.

System.Object
  System.Windows.Automation.AutomationElement

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

public sealed class AutomationElement

The AutomationElement type exposes the following members.

  NameDescription
Public propertyCachedGets the cached UI Automation property values for this AutomationElement object.
Public propertyCachedChildrenGets the cached child elements of this AutomationElement.
Public propertyCachedParentGets the cached parent of this AutomationElement.
Public propertyCurrentGets the current property values of the AutomationElement.
Public propertyStatic memberFocusedElementGets the AutomationElement that currently has focus.
Public propertyStatic memberRootElementGets the root AutomationElement for the current desktop.
Top

  NameDescription
Public methodEqualsDetermines whether the specified AutomationElement has the same value as this AutomationElement. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindAllReturns all AutomationElement objects that satisfy the specified condition.
Public methodFindFirstReturns the first child or descendant element that matches the specified condition.
Public methodStatic memberFromHandleRetrieves a new AutomationElement object for the user interface (UI) item referenced by the specified window handle.
Public methodStatic memberFromLocalProviderRetrieves a new AutomationElement object from a local IRawElementProviderSimple implementation.
Public methodStatic memberFromPointRetrieves a new AutomationElement object for the user interface (UI) item at specified point on the desktop.
Public methodGetCachedPatternRetrieves the specified pattern from the cache of this AutomationElement.
Public methodGetCachedPropertyValue(AutomationProperty)Retrieves the value of the specified property from the cache of this AutomationElement. An appropriate default value for the property type is returned for properties not explicitly supported by the target user interface (UI) element.
Public methodGetCachedPropertyValue(AutomationProperty, Boolean)Retrieves the value of the specified property from the cache of this AutomationElement, optionally ignoring any default property.
Public methodGetClickablePointRetrieves a point on the AutomationElement that can be clicked.
Public methodGetCurrentPatternRetrieves the specified pattern object on this AutomationElement.
Public methodGetCurrentPropertyValue(AutomationProperty)Retrieves the value of the specified property on this AutomationElement. An appropriate default value for the property type is returned for properties not explicitly supported by the target user interface (UI) element.
Public methodGetCurrentPropertyValue(AutomationProperty, Boolean)Retrieves the value of the specified property on this AutomationElement, optionally ignoring any default property.
Public methodGetHashCodeRetrieves the hash code for this AutomationElement. (Overrides Object.GetHashCode().)
Public methodGetRuntimeIdRetrieves the unique identifier assigned to the user interface (UI) item.
Public methodGetSupportedPatternsRetrieves the control patterns that this AutomationElement supports.
Public methodGetSupportedPropertiesRetrieves the identifiers of properties supported by the element.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetUpdatedCacheRetrieves a new AutomationElement with an updated cache.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetFocusSets focus on the AutomationElement.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetCachedPatternRetrieves a control pattern from the cache.
Public methodTryGetClickablePointRetrieves a point within the element that can be clicked.
Public methodTryGetCurrentPatternRetrieves an object that implements a control pattern.
Top

  NameDescription
Public operatorStatic memberEqualityReturns a value indicating whether the specified AutomationElement objects refer to the same user interface (UI) element.
Public operatorStatic memberInequalityReturns a value indicating whether the specified AutomationElement objects refer to different user interface (UI) elements.
Top

  NameDescription
Public fieldStatic memberAcceleratorKeyPropertyIdentifies the AcceleratorKey property.
Public fieldStatic memberAccessKeyPropertyIdentifies the AccessKey property.
Public fieldStatic memberAsyncContentLoadedEventIdentifies an event raised during asynchronous content-loading.
Public fieldStatic memberAutomationFocusChangedEventIdentifies an event that is raised when the focus has changed.
Public fieldStatic memberAutomationIdPropertyIdentifies the AutomationId property, which is used to identify elements.
Public fieldStatic memberAutomationPropertyChangedEventIdentifies a property-changed event.
Public fieldStatic memberBoundingRectanglePropertyIdentifies the BoundingRectangle property.
Public fieldStatic memberClassNamePropertyIdentifies the ClassName property.
Public fieldStatic memberClickablePointPropertyIdentifies the clickable point property.
Public fieldStatic memberControlTypePropertyIdentifies the ControlType property.
Public fieldStatic memberCulturePropertyIdentifies the culture property.
Public fieldStatic memberFrameworkIdPropertyIdentifies the FrameworkId property.
Public fieldStatic memberHasKeyboardFocusPropertyIdentifies the HasKeyboardFocus property.
Public fieldStatic memberHelpTextPropertyIdentifies the HelpText property.
Public fieldStatic memberIsContentElementPropertyIdentifies the IsContentElement property.
Public fieldStatic memberIsControlElementPropertyIdentifies the IsControlElement property.
Public fieldStatic memberIsDockPatternAvailablePropertyIdentifies the property that indicates whether the DockPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsEnabledPropertyIdentifies the IsEnabled property, which specifies whether the user interface (UI) item referenced by the AutomationElement is enabled.
Public fieldStatic memberIsExpandCollapsePatternAvailablePropertyIdentifies the property that indicates whether the ExpandCollapsePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsGridItemPatternAvailablePropertyIdentifies the property that indicates whether the GridItemPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsGridPatternAvailablePropertyIdentifies the property that indicates whether the GridPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsInvokePatternAvailablePropertyIdentifies the property that indicates whether the InvokePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsItemContainerPatternAvailableProperty
Public fieldStatic memberIsKeyboardFocusablePropertyIdentifies the IsKeyboardFocusable property.
Public fieldStatic memberIsMultipleViewPatternAvailablePropertyIdentifies the property that indicates whether the MultipleViewPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsOffscreenPropertyIdentifies the IsOffscreen property, which indicates whether the user interface (UI) item is visible on the screen. 
Public fieldStatic memberIsPasswordPropertyIdentifies the IsPassword property.
Public fieldStatic memberIsRangeValuePatternAvailablePropertyIdentifies the property that indicates whether the RangeValuePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsRequiredForFormPropertyIdentifies the IsRequiredForForm property.
Public fieldStatic memberIsScrollItemPatternAvailablePropertyIdentifies the property that indicates whether the ScrollItemPattern control pattern is available for this AutomationElement.
Public fieldStatic memberIsScrollPatternAvailablePropertyIdentifies the property that indicates whether the ScrollPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsSelectionItemPatternAvailablePropertyIdentifies the property that indicates whether the SelectionItemPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsSelectionPatternAvailablePropertyIdentifies the property that indicates whether the SelectionPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsSynchronizedInputPatternAvailableProperty
Public fieldStatic memberIsTableItemPatternAvailablePropertyIdentifies the property that indicates whether the TableItemPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsTablePatternAvailablePropertyIdentifies the property that indicates whether the TablePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsTextPatternAvailablePropertyIdentifies the property that indicates whether the TextPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsTogglePatternAvailablePropertyIdentifies the property that indicates whether the TogglePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsTransformPatternAvailablePropertyIdentifies the property that indicates whether the TransformPattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsValuePatternAvailablePropertyIdentifies the property that indicates whether the ValuePattern control pattern is available on this AutomationElement.
Public fieldStatic memberIsVirtualizedItemPatternAvailableProperty
Public fieldStatic memberIsWindowPatternAvailablePropertyIdentifies the property that indicates whether the WindowPattern control pattern is available on this AutomationElement.
Public fieldStatic memberItemStatusPropertyIdentifies the ItemStatus property, which specifies the status of the visual representation of a complex item.
Public fieldStatic memberItemTypePropertyIdentifies the ItemType property.
Public fieldStatic memberLabeledByPropertyIdentifies the LabeledBy property, which identifies the label associated with a control.
Public fieldStatic memberLayoutInvalidatedEventIdentifies the event that is raised when the layout is invalidated.
Public fieldStatic memberLocalizedControlTypePropertyIdentifies the LocalizedControlType property in the local language.
Public fieldStatic memberMenuClosedEventIdentifies the event that is raised when a menu is closed.
Public fieldStatic memberMenuOpenedEventIdentifies the event that is raised when a menu is opened.
Public fieldStatic memberNamePropertyIdentifies the Name property.
Public fieldStatic memberNativeWindowHandlePropertyIdentifies the NativeWindowHandle property.
Public fieldStatic memberNotSupportedIndicates that a property is not supported.
Public fieldStatic memberOrientationPropertyIdentifies the Orientation property.
Public fieldStatic memberProcessIdPropertyIdentifies the ProcessId property.
Public fieldStatic memberRuntimeIdPropertyIdentifies the property that contains the runtime identifier of the element.
Public fieldStatic memberStructureChangedEventIdentifies the event that is raised when the UI Automation tree structure is changed.
Public fieldStatic memberToolTipClosedEventIdentifies the event that is raised when a tooltip is closed.
Public fieldStatic memberToolTipOpenedEventIdentifies the event that is raised when a tooltip is opened.
Top

An AutomationElement corresponds to a piece of user interface (UI), regardless of underlying implementation (such as Windows Presentation Foundation (WPF) or Win32).

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft