AutomationElement 類別

定義

代表使用者介面自動化樹狀目錄中的使用者介面自動化項目,並包含可由使用者介面自動化用戶端應用程式當成識別項來使用的值。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
繼承
AutomationElement

備註

會對應到的某個使用者介面 (UI)user interface (UI)部分,而不論基礎的實作為Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) (例如Win32Win32或)。 AutomationElementAn AutomationElement corresponds to a piece of 使用者介面 (UI)user interface (UI), regardless of underlying implementation (such as Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) or Win32Win32).

欄位

AcceleratorKeyProperty

識別 AcceleratorKey 屬性。Identifies the AcceleratorKey property.

AccessKeyProperty

識別 AccessKey 屬性。Identifies the AccessKey property.

AsyncContentLoadedEvent

識別非同步內容載入期間引發的事件。Identifies an event raised during asynchronous content-loading.

AutomationFocusChangedEvent

識別變更焦點時引發的事件。Identifies an event that is raised when the focus has changed.

AutomationIdProperty

識別用來識別元素的 AutomationId 屬性。Identifies the AutomationId property, which is used to identify elements.

AutomationPropertyChangedEvent

識別屬性變更的事件。Identifies a property-changed event.

BoundingRectangleProperty

識別 BoundingRectangle 屬性。Identifies the BoundingRectangle property.

ClassNameProperty

識別 ClassName 屬性。Identifies the ClassName property.

ClickablePointProperty

識別可按點屬性。Identifies the clickable point property.

ControlTypeProperty

識別 ControlType 屬性。Identifies the ControlType property.

CultureProperty

識別文化特性屬性。Identifies the culture property.

FrameworkIdProperty

識別 FrameworkId 屬性。Identifies the FrameworkId property.

HasKeyboardFocusProperty

識別 HasKeyboardFocus 屬性。Identifies the HasKeyboardFocus property.

HelpTextProperty

識別 HelpText 屬性。Identifies the HelpText property.

IsContentElementProperty

識別 IsContentElement 屬性。Identifies the IsContentElement property.

IsControlElementProperty

識別 IsControlElement 屬性。Identifies the IsControlElement property.

IsDockPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 DockPattern 控制項模式的屬性。Identifies the property that indicates whether the DockPattern control pattern is available on this AutomationElement.

IsEnabledProperty

識別 IsEnabled 屬性,指出是否啟用 AutomationElement 所參考的 使用者介面 (UI)user interface (UI) 項目。Identifies the IsEnabled property, which specifies whether the 使用者介面 (UI)user interface (UI) item referenced by the AutomationElement is enabled.

IsExpandCollapsePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 ExpandCollapsePattern 控制項模式的屬性。Identifies the property that indicates whether the ExpandCollapsePattern control pattern is available on this AutomationElement.

IsGridItemPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 GridItemPattern 控制項模式的屬性。Identifies the property that indicates whether the GridItemPattern control pattern is available on this AutomationElement.

IsGridPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 GridPattern 控制項模式的屬性。Identifies the property that indicates whether the GridPattern control pattern is available on this AutomationElement.

IsInvokePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 InvokePattern 控制項模式的屬性。Identifies the property that indicates whether the InvokePattern control pattern is available on this AutomationElement.

IsItemContainerPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 ItemContainerPattern 控制項模式的屬性。Identifies the property that indicates whether the ItemContainerPattern control pattern is available on this AutomationElement.

IsKeyboardFocusableProperty

識別 IsKeyboardFocusable 屬性。Identifies the IsKeyboardFocusable property.

IsMultipleViewPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 MultipleViewPattern 控制項模式的屬性。Identifies the property that indicates whether the MultipleViewPattern control pattern is available on this AutomationElement.

IsOffscreenProperty

識別 IsOffscreen 屬性,該屬性表示是否可在螢幕上看見使用者介面 (UI)user interface (UI) 項目。Identifies the IsOffscreen property, which indicates whether the 使用者介面 (UI)user interface (UI) item is visible on the screen.

IsPasswordProperty

識別 IsPassword 屬性。Identifies the IsPassword property.

IsRangeValuePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 RangeValuePattern 控制項模式的屬性。Identifies the property that indicates whether the RangeValuePattern control pattern is available on this AutomationElement.

IsRequiredForFormProperty

識別 IsRequiredForForm 屬性。Identifies the IsRequiredForForm property.

IsScrollItemPatternAvailableProperty

識別的屬性指出此 AutomationElement 是否有 ScrollItemPattern 控制項模式。Identifies the property that indicates whether the ScrollItemPattern control pattern is available for this AutomationElement.

IsScrollPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 ScrollPattern 控制項模式的屬性。Identifies the property that indicates whether the ScrollPattern control pattern is available on this AutomationElement.

IsSelectionItemPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 SelectionItemPattern 控制項模式的屬性。Identifies the property that indicates whether the SelectionItemPattern control pattern is available on this AutomationElement.

IsSelectionPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 SelectionPattern 控制項模式的屬性。Identifies the property that indicates whether the SelectionPattern control pattern is available on this AutomationElement.

IsSynchronizedInputPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 SynchronizedInputPattern 控制項模式的屬性。Identifies the property that indicates whether the SynchronizedInputPattern control pattern is available on this AutomationElement.

IsTableItemPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 TableItemPattern 控制項模式的屬性。Identifies the property that indicates whether the TableItemPattern control pattern is available on this AutomationElement.

IsTablePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 TablePattern 控制項模式的屬性。Identifies the property that indicates whether the TablePattern control pattern is available on this AutomationElement.

IsTextPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 TextPattern 控制項模式的屬性。Identifies the property that indicates whether the TextPattern control pattern is available on this AutomationElement.

IsTogglePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 TogglePattern 控制項模式的屬性。Identifies the property that indicates whether the TogglePattern control pattern is available on this AutomationElement.

IsTransformPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 TransformPattern 控制項模式的屬性。Identifies the property that indicates whether the TransformPattern control pattern is available on this AutomationElement.

IsValuePatternAvailableProperty

識別表示這個 AutomationElement 上是否有 ValuePattern 控制項模式的屬性。Identifies the property that indicates whether the ValuePattern control pattern is available on this AutomationElement.

IsVirtualizedItemPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 VirtualizedItemPattern 控制項模式的屬性。Identifies the property that indicates whether the VirtualizedItemPattern control pattern is available on this AutomationElement.

IsWindowPatternAvailableProperty

識別表示這個 AutomationElement 上是否有 WindowPattern 控制項模式的屬性。Identifies the property that indicates whether the WindowPattern control pattern is available on this AutomationElement.

ItemStatusProperty

識別 ItemStatus 屬性,該屬性指出複雜項目的視覺化表示狀態。Identifies the ItemStatus property, which specifies the status of the visual representation of a complex item.

ItemTypeProperty

識別 ItemType 屬性。Identifies the ItemType property.

LabeledByProperty

識別 LabeledBy 屬性,該屬性會識別與控制項關聯的標籤。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

識別地區語言的 LocalizedControlType 屬性。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

識別 Name 屬性。Identifies the Name property.

NativeWindowHandleProperty

識別 NativeWindowHandle 屬性。Identifies the NativeWindowHandle property.

NotSupported

指出不支援某屬性。Indicates that a property is not supported.

OrientationProperty

識別 Orientation 屬性。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

識別 ProcessId 屬性。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

識別 UI 自動化UI Automation 樹狀變更時引發的事件。Identifies the event that is raised when the UI 自動化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.

屬性

Cached

取得這個 AutomationElement 物件的快取 UI 自動化UI Automation 屬性值。Gets the cached UI 自動化UI Automation property values for this AutomationElement object.

CachedChildren

取得這個 AutomationElement 的快取子元素。Gets the cached child elements of this AutomationElement.

CachedParent

取得這個 AutomationElement 的快取父系。Gets the cached parent of this AutomationElement.

Current

取得 AutomationElement 目前的屬性值。Gets the current property values of the AutomationElement.

FocusedElement

取得目前具有焦點的 AutomationElementGets the AutomationElement that currently has focus.

RootElement

取得目前桌面的根 AutomationElementGets the root AutomationElement for the current desktop.

方法

Equals(Object)

判斷指定的 AutomationElement 是否具有與此 AutomationElement 相同的值。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)

傳回滿足指定條件的所有 AutomationElement 物件。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)

針對指定之視窗控制代碼所參考的使用者介面 (UI)user interface (UI) 項目,擷取一個新的 AutomationElement 物件。Retrieves a new AutomationElement object for the 使用者介面 (UI)user interface (UI) item referenced by the specified window handle.

FromLocalProvider(IRawElementProviderSimple)

從本機 IRawElementProviderSimple 實作擷取新的 AutomationElement 物件。Retrieves a new AutomationElement object from a local IRawElementProviderSimple implementation.

FromPoint(Point)

針對位於桌面上所指定點的 AutomationElement 項目擷取新的 使用者介面 (UI)user interface (UI) 物件。Retrieves a new AutomationElement object for the 使用者介面 (UI)user interface (UI) item at specified point on the desktop.

GetCachedPattern(AutomationPattern)

從這個 AutomationElement 的快取擷取指定的模式。Retrieves the specified pattern from the cache of this AutomationElement.

GetCachedPropertyValue(AutomationProperty)

從這個 AutomationElement 的快取擷取所指定屬性的值。Retrieves the value of the specified property from the cache of this AutomationElement. 對於目標 使用者介面 (UI)user interface (UI) 元素未明確支援的屬性,會傳回屬性類型的適當預設值。An appropriate default value for the property type is returned for properties not explicitly supported by the target 使用者介面 (UI)user interface (UI) element.

GetCachedPropertyValue(AutomationProperty, Boolean)

從這個 AutomationElement 的快取擷取所指定屬性的值,選擇忽略任何預設屬性。Retrieves the value of the specified property from the cache of this AutomationElement, optionally ignoring any default property.

GetClickablePoint()

在可點按的 AutomationElement 上擷取點。Retrieves a point on the AutomationElement that can be clicked.

GetCurrentPattern(AutomationPattern)

在此 AutomationElement 上擷取指定的模式物件。Retrieves the specified pattern object on this AutomationElement.

GetCurrentPropertyValue(AutomationProperty)

在此 AutomationElement 上擷取所指定屬性的值。Retrieves the value of the specified property on this AutomationElement. 對於目標 使用者介面 (UI)user interface (UI) 元素未明確支援的屬性,會傳回屬性類型的適當預設值。An appropriate default value for the property type is returned for properties not explicitly supported by the target 使用者介面 (UI)user interface (UI) element.

GetCurrentPropertyValue(AutomationProperty, Boolean)

在此 AutomationElement 上擷取所指定屬性的值,選擇性忽略任何預設屬性。Retrieves the value of the specified property on this AutomationElement, optionally ignoring any default property.

GetHashCode()

擷取此 AutomationElement 的雜湊碼。Retrieves the hash code for this AutomationElement.

GetRuntimeId()

擷取已指派給 使用者介面 (UI)user interface (UI) 項目的唯一識別碼。Retrieves the unique identifier assigned to the 使用者介面 (UI)user interface (UI) item.

GetSupportedPatterns()

擷取此 AutomationElement 支援的控制項模式。Retrieves the control patterns that this AutomationElement supports.

GetSupportedProperties()

擷取元素支援之屬性的識別碼。Retrieves the identifiers of properties supported by the element.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetUpdatedCache(CacheRequest)

擷取具有已更新之快取的新的 AutomationElementRetrieves a new AutomationElement with an updated cache.

MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
SetFocus()

將焦點設在 AutomationElementSets focus on the AutomationElement.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 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.

運算子

Equality(AutomationElement, AutomationElement)

傳回一個值,這個值指出指定的 AutomationElement 物件是否參考相同的 使用者介面 (UI)user interface (UI) 元素。Returns a value indicating whether the specified AutomationElement objects refer to the same 使用者介面 (UI)user interface (UI) element.

Inequality(AutomationElement, AutomationElement)

傳回值,指出指定的 AutomationElement 物件是否參考不同的 使用者介面 (UI)user interface (UI) 元素。Returns a value indicating whether the specified AutomationElement objects refer to different 使用者介面 (UI)user interface (UI) elements.

適用於

另請參閱