AutomationElement 类

定义

表示UI 自动化树中的UI 自动化元素,并包含UI 自动化客户端应用程序用作标识符的值。

public ref class AutomationElement sealed
public sealed class AutomationElement
type AutomationElement = class
Public NotInheritable Class AutomationElement
继承
AutomationElement

注解

无论基础实现(如Windows Presentation Foundation(WPF)还是 Win32,AutomationElement对应于用户界面(UI)。

字段

名称 说明
AcceleratorKeyProperty

标识 AcceleratorKey 属性。

AccessKeyProperty

标识 AccessKey 属性。

ActiveTextPositionChangedEvent

事件 ID:ActiveTextPositionChanged - 指示文本元素中的活动位置已更改。

AsyncContentLoadedEvent

标识在异步内容加载期间引发的事件。

AutomationFocusChangedEvent

标识焦点发生更改时引发的事件。

AutomationIdProperty

标识用于 AutomationId 标识元素的属性。

AutomationPropertyChangedEvent

标识属性更改的事件。

BoundingRectangleProperty

标识 BoundingRectangle 属性。

ClassNameProperty

标识 ClassName 属性。

ClickablePointProperty

标识可单击的点属性。

ControlTypeProperty

标识 ControlType 属性。

CultureProperty

标识区域性属性。

FrameworkIdProperty

标识 FrameworkId 属性。

HasKeyboardFocusProperty

标识 HasKeyboardFocus 属性。

HeadingLevelProperty

属性 ID:HeadingLevel - 描述元素的标题级别。

HelpTextProperty

标识 HelpText 属性。

IsContentElementProperty

标识 IsContentElement 属性。

IsControlElementProperty

标识 IsControlElement 属性。

IsDialogProperty

属性 ID:IsDialog - 标识自动化元素是否为对话框。

IsDockPatternAvailableProperty

标识指示控件模式是否 DockPattern 对此可用 AutomationElement的属性。

IsEnabledProperty

标识属性 IsEnabled ,该属性指定是否启用由该属性引用 AutomationElement 的用户界面(UI)项。

IsExpandCollapsePatternAvailableProperty

标识指示控件模式是否 ExpandCollapsePattern 对此可用 AutomationElement的属性。

IsGridItemPatternAvailableProperty

标识指示控件模式是否 GridItemPattern 对此可用 AutomationElement的属性。

IsGridPatternAvailableProperty

标识指示控件模式是否 GridPattern 对此可用 AutomationElement的属性。

IsInvokePatternAvailableProperty

标识指示控件模式是否 InvokePattern 对此可用 AutomationElement的属性。

IsItemContainerPatternAvailableProperty

标识指示控件模式是否 ItemContainerPattern 对此可用 AutomationElement的属性。

IsKeyboardFocusableProperty

标识 IsKeyboardFocusable 属性。

IsMultipleViewPatternAvailableProperty

标识指示控件模式是否 MultipleViewPattern 对此可用 AutomationElement的属性。

IsOffscreenProperty

标识属性 IsOffscreen ,该属性指示用户界面 (UI) 项是否在屏幕上可见。

IsPasswordProperty

标识 IsPassword 属性。

IsRangeValuePatternAvailableProperty

标识指示控件模式是否 RangeValuePattern 对此可用 AutomationElement的属性。

IsRequiredForFormProperty

标识 IsRequiredForForm 属性。

IsScrollItemPatternAvailableProperty

标识指示控件模式是否 ScrollItemPattern 可用于此 AutomationElement属性的属性。

IsScrollPatternAvailableProperty

标识指示控件模式是否 ScrollPattern 对此可用 AutomationElement的属性。

IsSelectionItemPatternAvailableProperty

标识指示控件模式是否 SelectionItemPattern 对此可用 AutomationElement的属性。

IsSelectionPatternAvailableProperty

标识指示控件模式是否 SelectionPattern 对此可用 AutomationElement的属性。

IsSynchronizedInputPatternAvailableProperty

标识指示控件模式是否 SynchronizedInputPattern 对此可用 AutomationElement的属性。

IsTableItemPatternAvailableProperty

标识指示控件模式是否 TableItemPattern 对此可用 AutomationElement的属性。

IsTablePatternAvailableProperty

标识指示控件模式是否 TablePattern 对此可用 AutomationElement的属性。

IsTextPatternAvailableProperty

标识指示控件模式是否 TextPattern 对此可用 AutomationElement的属性。

IsTogglePatternAvailableProperty

标识指示控件模式是否 TogglePattern 对此可用 AutomationElement的属性。

IsTransformPatternAvailableProperty

标识指示控件模式是否 TransformPattern 对此可用 AutomationElement的属性。

IsValuePatternAvailableProperty

标识指示控件模式是否 ValuePattern 对此可用 AutomationElement的属性。

IsVirtualizedItemPatternAvailableProperty

标识指示控件模式是否 VirtualizedItemPattern 对此可用 AutomationElement的属性。

IsWindowPatternAvailableProperty

标识指示控件模式是否 WindowPattern 对此可用 AutomationElement的属性。

ItemStatusProperty

标识属性 ItemStatus ,该属性指定复杂项的可视表示形式的状态。

ItemTypeProperty

标识 ItemType 属性。

LabeledByProperty

标识属性 LabeledBy ,该属性标识与控件关联的标签。

LayoutInvalidatedEvent

标识布局失效时引发的事件。

LocalizedControlTypeProperty

LocalizedControlType标识本地语言中的属性。

MenuClosedEvent

标识关闭菜单时引发的事件。

MenuOpenedEvent

标识在打开菜单时引发的事件。

NameProperty

标识 Name 属性。

NativeWindowHandleProperty

标识 NativeWindowHandle 属性。

NotificationEvent

事件 ID:通知 - 主要由服务器用来引发通用通知。

NotSupported

指示不支持属性。

OrientationProperty

标识 Orientation 属性。

PositionInSetProperty

描述一组被视为同级元素的自动化元素的序号位置。

ProcessIdProperty

标识 ProcessId 属性。

RuntimeIdProperty

标识包含元素的运行时标识符的属性。

SizeOfSetProperty

描述被视为同级组或集中的自动化元素计数。

StructureChangedEvent

标识更改UI 自动化树结构时引发的事件。

ToolTipClosedEvent

标识在关闭工具提示时引发的事件。

ToolTipOpenedEvent

标识打开工具提示时引发的事件。

属性

名称 说明
Cached

获取此 AutomationElement 对象的缓存 UI 自动化属性值。

CachedChildren

获取此 AutomationElement元素的缓存子元素。

CachedParent

获取此 AutomationElement缓存的父级。

Current

获取 . 的 AutomationElement当前属性值。

FocusedElement

AutomationElement获取当前具有焦点的焦点。

RootElement

获取当前桌面的根 AutomationElement 目录。

方法

名称 说明
Equals(Object)

确定指定的 AutomationElement 值是否与此 AutomationElement值相同。

Finalize()

允许对象在垃圾回收回收资源之前尝试释放资源并执行其他清理操作。

FindAll(TreeScope, Condition)

返回满足指定条件的所有 AutomationElement 对象。

FindFirst(TreeScope, Condition)

返回与指定条件匹配的第一个子元素或子代元素。

FromHandle(IntPtr)

检索由指定窗口句柄引用的用户界面 (UI) 项的新 AutomationElement 对象。

FromLocalProvider(IRawElementProviderSimple)

从本地AutomationElement实现中检索新IRawElementProviderSimple对象。

FromPoint(Point)

检索桌面上指定点用户界面(UI)项的新 AutomationElement 对象。

GetCachedPattern(AutomationPattern)

从此 AutomationElement缓存中检索指定的模式。

GetCachedPropertyValue(AutomationProperty, Boolean)

从缓存 AutomationElement中检索指定属性的值,可以选择忽略任何默认属性。

GetCachedPropertyValue(AutomationProperty)

从此 AutomationElement缓存中检索指定属性的值。 对于目标用户界面 (UI) 元素未显式支持的属性,将返回属性类型的相应默认值。

GetClickablePoint()

检索可单击的点 AutomationElement

GetCurrentPattern(AutomationPattern)

检索此 AutomationElement对象上的指定模式对象。

GetCurrentPropertyValue(AutomationProperty, Boolean)

检索此 AutomationElement属性上的指定属性的值,可以选择忽略任何默认属性。

GetCurrentPropertyValue(AutomationProperty)

检索此 AutomationElement属性的指定属性的值。 对于目标用户界面 (UI) 元素未显式支持的属性,将返回属性类型的相应默认值。

GetHashCode()

检索此 AutomationElement代码的哈希代码。

GetRuntimeId()

检索分配给用户界面 (UI) 项的唯一标识符。

GetSupportedPatterns()

检索此 AutomationElement 支持的控件模式。

GetSupportedProperties()

检索元素支持的属性标识符。

GetType()

获取当前实例的 Type

(继承自 Object)
GetUpdatedCache(CacheRequest)

使用更新的缓存检索新 AutomationElement 项。

MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
SetFocus()

设置焦点。AutomationElement

ToString()

返回一个表示当前对象的字符串。

(继承自 Object)
TryGetCachedPattern(AutomationPattern, Object)

从缓存中检索控件模式。

TryGetClickablePoint(Point)

检索可以单击的元素中的点。

TryGetCurrentPattern(AutomationPattern, Object)

检索实现控件模式的对象。

运营商

名称 说明
Equality(AutomationElement, AutomationElement)

返回一个值,该值指示指定的 AutomationElement 对象是否引用相同的用户界面 (UI) 元素。

Inequality(AutomationElement, AutomationElement)

返回一个值,该值指示指定的 AutomationElement 对象是否引用不同的用户界面 (UI) 元素。

适用于

另请参阅