AutomationElement AutomationElement AutomationElement AutomationElement Class

Definition

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

public ref class AutomationElement sealed
public sealed class AutomationElement
type AutomationElement = class
Public NotInheritable Class AutomationElement
Inheritance
AutomationElementAutomationElementAutomationElementAutomationElement

Remarks

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

Fields

AcceleratorKeyProperty AcceleratorKeyProperty AcceleratorKeyProperty AcceleratorKeyProperty

Identifies the AcceleratorKey property.

AccessKeyProperty AccessKeyProperty AccessKeyProperty AccessKeyProperty

Identifies the AccessKey property.

AsyncContentLoadedEvent AsyncContentLoadedEvent AsyncContentLoadedEvent AsyncContentLoadedEvent

Identifies an event raised during asynchronous content-loading.

AutomationFocusChangedEvent AutomationFocusChangedEvent AutomationFocusChangedEvent AutomationFocusChangedEvent

Identifies an event that is raised when the focus has changed.

AutomationIdProperty AutomationIdProperty AutomationIdProperty AutomationIdProperty

Identifies the AutomationId property, which is used to identify elements.

AutomationPropertyChangedEvent AutomationPropertyChangedEvent AutomationPropertyChangedEvent AutomationPropertyChangedEvent

Identifies a property-changed event.

BoundingRectangleProperty BoundingRectangleProperty BoundingRectangleProperty BoundingRectangleProperty

Identifies the BoundingRectangle property.

ClassNameProperty ClassNameProperty ClassNameProperty ClassNameProperty

Identifies the ClassName property.

ClickablePointProperty ClickablePointProperty ClickablePointProperty ClickablePointProperty

Identifies the clickable point property.

ControlTypeProperty ControlTypeProperty ControlTypeProperty ControlTypeProperty

Identifies the ControlType property.

CultureProperty CultureProperty CultureProperty CultureProperty

Identifies the culture property.

FrameworkIdProperty FrameworkIdProperty FrameworkIdProperty FrameworkIdProperty

Identifies the FrameworkId property.

HasKeyboardFocusProperty HasKeyboardFocusProperty HasKeyboardFocusProperty HasKeyboardFocusProperty

Identifies the HasKeyboardFocus property.

HelpTextProperty HelpTextProperty HelpTextProperty HelpTextProperty

Identifies the HelpText property.

IsContentElementProperty IsContentElementProperty IsContentElementProperty IsContentElementProperty

Identifies the IsContentElement property.

IsControlElementProperty IsControlElementProperty IsControlElementProperty IsControlElementProperty

Identifies the IsControlElement property.

IsDockPatternAvailableProperty IsDockPatternAvailableProperty IsDockPatternAvailableProperty IsDockPatternAvailableProperty

Identifies the property that indicates whether the DockPattern control pattern is available on this AutomationElement.

IsEnabledProperty IsEnabledProperty IsEnabledProperty IsEnabledProperty

Identifies the IsEnabled property, which specifies whether the user interface (UI) item referenced by the AutomationElement is enabled.

IsExpandCollapsePatternAvailableProperty IsExpandCollapsePatternAvailableProperty IsExpandCollapsePatternAvailableProperty IsExpandCollapsePatternAvailableProperty

Identifies the property that indicates whether the ExpandCollapsePattern control pattern is available on this AutomationElement.

IsGridItemPatternAvailableProperty IsGridItemPatternAvailableProperty IsGridItemPatternAvailableProperty IsGridItemPatternAvailableProperty

Identifies the property that indicates whether the GridItemPattern control pattern is available on this AutomationElement.

IsGridPatternAvailableProperty IsGridPatternAvailableProperty IsGridPatternAvailableProperty IsGridPatternAvailableProperty

Identifies the property that indicates whether the GridPattern control pattern is available on this AutomationElement.

IsInvokePatternAvailableProperty IsInvokePatternAvailableProperty IsInvokePatternAvailableProperty IsInvokePatternAvailableProperty

Identifies the property that indicates whether the InvokePattern control pattern is available on this AutomationElement.

IsItemContainerPatternAvailableProperty IsItemContainerPatternAvailableProperty IsItemContainerPatternAvailableProperty IsItemContainerPatternAvailableProperty

Identifies the property that indicates whether the ItemContainerPattern control pattern is available on this AutomationElement.

IsKeyboardFocusableProperty IsKeyboardFocusableProperty IsKeyboardFocusableProperty IsKeyboardFocusableProperty

Identifies the IsKeyboardFocusable property.

IsMultipleViewPatternAvailableProperty IsMultipleViewPatternAvailableProperty IsMultipleViewPatternAvailableProperty IsMultipleViewPatternAvailableProperty

Identifies the property that indicates whether the MultipleViewPattern control pattern is available on this AutomationElement.

IsOffscreenProperty IsOffscreenProperty IsOffscreenProperty IsOffscreenProperty

Identifies the IsOffscreen property, which indicates whether the user interface (UI) item is visible on the screen.

IsPasswordProperty IsPasswordProperty IsPasswordProperty IsPasswordProperty

Identifies the IsPassword property.

IsRangeValuePatternAvailableProperty IsRangeValuePatternAvailableProperty IsRangeValuePatternAvailableProperty IsRangeValuePatternAvailableProperty

Identifies the property that indicates whether the RangeValuePattern control pattern is available on this AutomationElement.

IsRequiredForFormProperty IsRequiredForFormProperty IsRequiredForFormProperty IsRequiredForFormProperty

Identifies the IsRequiredForForm property.

IsScrollItemPatternAvailableProperty IsScrollItemPatternAvailableProperty IsScrollItemPatternAvailableProperty IsScrollItemPatternAvailableProperty

Identifies the property that indicates whether the ScrollItemPattern control pattern is available for this AutomationElement.

IsScrollPatternAvailableProperty IsScrollPatternAvailableProperty IsScrollPatternAvailableProperty IsScrollPatternAvailableProperty

Identifies the property that indicates whether the ScrollPattern control pattern is available on this AutomationElement.

IsSelectionItemPatternAvailableProperty IsSelectionItemPatternAvailableProperty IsSelectionItemPatternAvailableProperty IsSelectionItemPatternAvailableProperty

Identifies the property that indicates whether the SelectionItemPattern control pattern is available on this AutomationElement.

IsSelectionPatternAvailableProperty IsSelectionPatternAvailableProperty IsSelectionPatternAvailableProperty IsSelectionPatternAvailableProperty

Identifies the property that indicates whether the SelectionPattern control pattern is available on this AutomationElement.

IsSynchronizedInputPatternAvailableProperty IsSynchronizedInputPatternAvailableProperty IsSynchronizedInputPatternAvailableProperty IsSynchronizedInputPatternAvailableProperty

Identifies the property that indicates whether the SynchronizedInputPattern control pattern is available on this AutomationElement.

IsTableItemPatternAvailableProperty IsTableItemPatternAvailableProperty IsTableItemPatternAvailableProperty IsTableItemPatternAvailableProperty

Identifies the property that indicates whether the TableItemPattern control pattern is available on this AutomationElement.

IsTablePatternAvailableProperty IsTablePatternAvailableProperty IsTablePatternAvailableProperty IsTablePatternAvailableProperty

Identifies the property that indicates whether the TablePattern control pattern is available on this AutomationElement.

IsTextPatternAvailableProperty IsTextPatternAvailableProperty IsTextPatternAvailableProperty IsTextPatternAvailableProperty

Identifies the property that indicates whether the TextPattern control pattern is available on this AutomationElement.

IsTogglePatternAvailableProperty IsTogglePatternAvailableProperty IsTogglePatternAvailableProperty IsTogglePatternAvailableProperty

Identifies the property that indicates whether the TogglePattern control pattern is available on this AutomationElement.

IsTransformPatternAvailableProperty IsTransformPatternAvailableProperty IsTransformPatternAvailableProperty IsTransformPatternAvailableProperty

Identifies the property that indicates whether the TransformPattern control pattern is available on this AutomationElement.

IsValuePatternAvailableProperty IsValuePatternAvailableProperty IsValuePatternAvailableProperty IsValuePatternAvailableProperty

Identifies the property that indicates whether the ValuePattern control pattern is available on this AutomationElement.

IsVirtualizedItemPatternAvailableProperty IsVirtualizedItemPatternAvailableProperty IsVirtualizedItemPatternAvailableProperty IsVirtualizedItemPatternAvailableProperty

Identifies the property that indicates whether the VirtualizedItemPattern control pattern is available on this AutomationElement.

IsWindowPatternAvailableProperty IsWindowPatternAvailableProperty IsWindowPatternAvailableProperty IsWindowPatternAvailableProperty

Identifies the property that indicates whether the WindowPattern control pattern is available on this AutomationElement.

ItemStatusProperty ItemStatusProperty ItemStatusProperty ItemStatusProperty

Identifies the ItemStatus property, which specifies the status of the visual representation of a complex item.

ItemTypeProperty ItemTypeProperty ItemTypeProperty ItemTypeProperty

Identifies the ItemType property.

LabeledByProperty LabeledByProperty LabeledByProperty LabeledByProperty

Identifies the LabeledBy property, which identifies the label associated with a control.

LayoutInvalidatedEvent LayoutInvalidatedEvent LayoutInvalidatedEvent LayoutInvalidatedEvent

Identifies the event that is raised when the layout is invalidated.

LocalizedControlTypeProperty LocalizedControlTypeProperty LocalizedControlTypeProperty LocalizedControlTypeProperty

Identifies the LocalizedControlType property in the local language.

MenuClosedEvent MenuClosedEvent MenuClosedEvent MenuClosedEvent

Identifies the event that is raised when a menu is closed.

MenuOpenedEvent MenuOpenedEvent MenuOpenedEvent MenuOpenedEvent

Identifies the event that is raised when a menu is opened.

NameProperty NameProperty NameProperty NameProperty

Identifies the Name property.

NativeWindowHandleProperty NativeWindowHandleProperty NativeWindowHandleProperty NativeWindowHandleProperty

Identifies the NativeWindowHandle property.

NotSupported NotSupported NotSupported NotSupported

Indicates that a property is not supported.

OrientationProperty OrientationProperty OrientationProperty OrientationProperty

Identifies the Orientation property.

ProcessIdProperty ProcessIdProperty ProcessIdProperty ProcessIdProperty

Identifies the ProcessId property.

RuntimeIdProperty RuntimeIdProperty RuntimeIdProperty RuntimeIdProperty

Identifies the property that contains the runtime identifier of the element.

StructureChangedEvent StructureChangedEvent StructureChangedEvent StructureChangedEvent

Identifies the event that is raised when the UI Automation tree structure is changed.

ToolTipClosedEvent ToolTipClosedEvent ToolTipClosedEvent ToolTipClosedEvent

Identifies the event that is raised when a tooltip is closed.

ToolTipOpenedEvent ToolTipOpenedEvent ToolTipOpenedEvent ToolTipOpenedEvent

Identifies the event that is raised when a tooltip is opened.

Properties

Cached Cached Cached Cached

Gets the cached UI Automation property values for this AutomationElement object.

CachedChildren CachedChildren CachedChildren CachedChildren

Gets the cached child elements of this AutomationElement.

CachedParent CachedParent CachedParent CachedParent

Gets the cached parent of this AutomationElement.

Current Current Current Current

Gets the current property values of the AutomationElement.

FocusedElement FocusedElement FocusedElement FocusedElement

Gets the AutomationElement that currently has focus.

RootElement RootElement RootElement RootElement

Gets the root AutomationElement for the current desktop.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified AutomationElement has the same value as this AutomationElement.

Finalize() Finalize() Finalize() Finalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

FindAll(TreeScope, Condition) FindAll(TreeScope, Condition) FindAll(TreeScope, Condition) FindAll(TreeScope, Condition)

Returns all AutomationElement objects that satisfy the specified condition.

FindFirst(TreeScope, Condition) FindFirst(TreeScope, Condition) FindFirst(TreeScope, Condition) FindFirst(TreeScope, Condition)

Returns the first child or descendant element that matches the specified condition.

FromHandle(IntPtr) FromHandle(IntPtr) FromHandle(IntPtr) FromHandle(IntPtr)

Retrieves a new AutomationElement object for the user interface (UI) item referenced by the specified window handle.

FromLocalProvider(IRawElementProviderSimple) FromLocalProvider(IRawElementProviderSimple) FromLocalProvider(IRawElementProviderSimple) FromLocalProvider(IRawElementProviderSimple)

Retrieves a new AutomationElement object from a local IRawElementProviderSimple implementation.

FromPoint(Point) FromPoint(Point) FromPoint(Point) FromPoint(Point)

Retrieves a new AutomationElement object for the user interface (UI) item at specified point on the desktop.

GetCachedPattern(AutomationPattern) GetCachedPattern(AutomationPattern) GetCachedPattern(AutomationPattern) GetCachedPattern(AutomationPattern)

Retrieves the specified pattern from the cache of this AutomationElement.

GetCachedPropertyValue(AutomationProperty) GetCachedPropertyValue(AutomationProperty) GetCachedPropertyValue(AutomationProperty) GetCachedPropertyValue(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.

GetCachedPropertyValue(AutomationProperty, Boolean) GetCachedPropertyValue(AutomationProperty, Boolean) GetCachedPropertyValue(AutomationProperty, Boolean) GetCachedPropertyValue(AutomationProperty, Boolean)

Retrieves the value of the specified property from the cache of this AutomationElement, optionally ignoring any default property.

GetClickablePoint() GetClickablePoint() GetClickablePoint() GetClickablePoint()

Retrieves a point on the AutomationElement that can be clicked.

GetCurrentPattern(AutomationPattern) GetCurrentPattern(AutomationPattern) GetCurrentPattern(AutomationPattern) GetCurrentPattern(AutomationPattern)

Retrieves the specified pattern object on this AutomationElement.

GetCurrentPropertyValue(AutomationProperty) GetCurrentPropertyValue(AutomationProperty) GetCurrentPropertyValue(AutomationProperty) GetCurrentPropertyValue(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.

GetCurrentPropertyValue(AutomationProperty, Boolean) GetCurrentPropertyValue(AutomationProperty, Boolean) GetCurrentPropertyValue(AutomationProperty, Boolean) GetCurrentPropertyValue(AutomationProperty, Boolean)

Retrieves the value of the specified property on this AutomationElement, optionally ignoring any default property.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Retrieves the hash code for this AutomationElement.

GetRuntimeId() GetRuntimeId() GetRuntimeId() GetRuntimeId()

Retrieves the unique identifier assigned to the user interface (UI) item.

GetSupportedPatterns() GetSupportedPatterns() GetSupportedPatterns() GetSupportedPatterns()

Retrieves the control patterns that this AutomationElement supports.

GetSupportedProperties() GetSupportedProperties() GetSupportedProperties() GetSupportedProperties()

Retrieves the identifiers of properties supported by the element.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUpdatedCache(CacheRequest) GetUpdatedCache(CacheRequest) GetUpdatedCache(CacheRequest) GetUpdatedCache(CacheRequest)

Retrieves a new AutomationElement with an updated cache.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetFocus() SetFocus() SetFocus() SetFocus()

Sets focus on the AutomationElement.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryGetCachedPattern(AutomationPattern, Object) TryGetCachedPattern(AutomationPattern, Object) TryGetCachedPattern(AutomationPattern, Object) TryGetCachedPattern(AutomationPattern, Object)

Retrieves a control pattern from the cache.

TryGetClickablePoint(Point) TryGetClickablePoint(Point) TryGetClickablePoint(Point) TryGetClickablePoint(Point)

Retrieves a point within the element that can be clicked.

TryGetCurrentPattern(AutomationPattern, Object) TryGetCurrentPattern(AutomationPattern, Object) TryGetCurrentPattern(AutomationPattern, Object) TryGetCurrentPattern(AutomationPattern, Object)

Retrieves an object that implements a control pattern.

Operators

Equality(AutomationElement, AutomationElement) Equality(AutomationElement, AutomationElement) Equality(AutomationElement, AutomationElement) Equality(AutomationElement, AutomationElement)

Returns a value indicating whether the specified AutomationElement objects refer to the same user interface (UI) element.

Inequality(AutomationElement, AutomationElement) Inequality(AutomationElement, AutomationElement) Inequality(AutomationElement, AutomationElement) Inequality(AutomationElement, AutomationElement)

Returns a value indicating whether the specified AutomationElement objects refer to different user interface (UI) elements.

Applies to