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
AutomationElement

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

Identifies the AcceleratorKey property.

AccessKeyProperty

Identifies the AccessKey property.

ActiveTextPositionChangedEvent

Event ID: ActiveTextPositionChanged - Indicates that the active position within a text element has changed.

AsyncContentLoadedEvent

Identifies an event raised during asynchronous content-loading.

AutomationFocusChangedEvent

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

AutomationIdProperty

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

AutomationPropertyChangedEvent

Identifies a property-changed event.

BoundingRectangleProperty

Identifies the BoundingRectangle property.

ClassNameProperty

Identifies the ClassName property.

ClickablePointProperty

Identifies the clickable point property.

ControlTypeProperty

Identifies the ControlType property.

CultureProperty

Identifies the culture property.

FrameworkIdProperty

Identifies the FrameworkId property.

HasKeyboardFocusProperty

Identifies the HasKeyboardFocus property.

HeadingLevelProperty

Property ID: HeadingLevel - Describes the heading level of an element.

HelpTextProperty

Identifies the HelpText property.

IsContentElementProperty

Identifies the IsContentElement property.

IsControlElementProperty

Identifies the IsControlElement property.

IsDialogProperty

Property ID: IsDialog - Identifies if the automation element is a dialog.

IsDockPatternAvailableProperty

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

IsEnabledProperty

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

IsExpandCollapsePatternAvailableProperty

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

IsGridItemPatternAvailableProperty

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

IsGridPatternAvailableProperty

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

IsInvokePatternAvailableProperty

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

IsItemContainerPatternAvailableProperty

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

IsKeyboardFocusableProperty

Identifies the IsKeyboardFocusable property.

IsMultipleViewPatternAvailableProperty

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

IsOffscreenProperty

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

IsPasswordProperty

Identifies the IsPassword property.

IsRangeValuePatternAvailableProperty

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

IsRequiredForFormProperty

Identifies the IsRequiredForForm property.

IsScrollItemPatternAvailableProperty

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

IsScrollPatternAvailableProperty

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

IsSelectionItemPatternAvailableProperty

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

IsSelectionPatternAvailableProperty

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

IsSynchronizedInputPatternAvailableProperty

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

IsTableItemPatternAvailableProperty

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

IsTablePatternAvailableProperty

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

IsTextPatternAvailableProperty

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

IsTogglePatternAvailableProperty

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

IsTransformPatternAvailableProperty

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

IsValuePatternAvailableProperty

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

IsVirtualizedItemPatternAvailableProperty

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

IsWindowPatternAvailableProperty

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

ItemStatusProperty

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

ItemTypeProperty

Identifies the ItemType property.

LabeledByProperty

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

LayoutInvalidatedEvent

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

LocalizedControlTypeProperty

Identifies the LocalizedControlType property in the local language.

MenuClosedEvent

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

MenuOpenedEvent

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

NameProperty

Identifies the Name property.

NativeWindowHandleProperty

Identifies the NativeWindowHandle property.

NotificationEvent

Event ID: Notification - used mainly by servers to raise a generic notification.

NotSupported

Indicates that a property is not supported.

OrientationProperty

Identifies the Orientation property.

PositionInSetProperty

Describes the ordinal location of an automation element within a set of elements that are considered to be siblings.

ProcessIdProperty

Identifies the ProcessId property.

RuntimeIdProperty

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

SizeOfSetProperty

Describes the count of automation elements in a group or set that are considered to be siblings.

StructureChangedEvent

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

ToolTipClosedEvent

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

ToolTipOpenedEvent

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

Properties

Cached

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

CachedChildren

Gets the cached child elements of this AutomationElement.

CachedParent

Gets the cached parent of this AutomationElement.

Current

Gets the current property values of the AutomationElement.

FocusedElement

Gets the AutomationElement that currently has focus.

RootElement

Gets the root AutomationElement for the current desktop.

Methods

Equals(Object)

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

Finalize()

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

FindAll(TreeScope, Condition)

Returns all AutomationElement objects that satisfy the specified condition.

FindFirst(TreeScope, Condition)

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

FromHandle(IntPtr)

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

FromLocalProvider(IRawElementProviderSimple)

Retrieves a new AutomationElement object from a local IRawElementProviderSimple implementation.

FromPoint(Point)

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

GetCachedPattern(AutomationPattern)

Retrieves the specified pattern from the cache of this AutomationElement.

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)

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

GetClickablePoint()

Retrieves a point on the AutomationElement that can be clicked.

GetCurrentPattern(AutomationPattern)

Retrieves the specified pattern object on this AutomationElement.

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)

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

GetHashCode()

Retrieves the hash code for this AutomationElement.

GetRuntimeId()

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

GetSupportedPatterns()

Retrieves the control patterns that this AutomationElement supports.

GetSupportedProperties()

Retrieves the identifiers of properties supported by the element.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUpdatedCache(CacheRequest)

Retrieves a new AutomationElement with an updated cache.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetFocus()

Sets focus on the AutomationElement.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryGetCachedPattern(AutomationPattern, Object)

Retrieves a control pattern from the cache.

TryGetClickablePoint(Point)

Retrieves a point within the element that can be clicked.

TryGetCurrentPattern(AutomationPattern, Object)

Retrieves an object that implements a control pattern.

Operators

Equality(AutomationElement, AutomationElement)

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

Inequality(AutomationElement, AutomationElement)

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

Applies to

See also