UITechnologyElementProxy 类

代理 UITechnologyElement 类。 插件必须重写此扩展和自定义。的技术元素的行为。

继承层次结构

Object
  Microsoft.VisualStudio.TestTools.UITest.Extension.UITechnologyElement
    Microsoft.VisualStudio.TestTools.UITesting.UITechnologyElementProxy

命名空间:  Microsoft.VisualStudio.TestTools.UITesting
程序集:  Microsoft.VisualStudio.TestTools.UITesting(在 Microsoft.VisualStudio.TestTools.UITesting.dll 中)

语法

声明
<ComVisibleAttribute(True)> _
Public MustInherit Class UITechnologyElementProxy _
    Inherits UITechnologyElement
[ComVisibleAttribute(true)]
public abstract class UITechnologyElementProxy : UITechnologyElement
[ComVisibleAttribute(true)]
public ref class UITechnologyElementProxy abstract : public UITechnologyElement
[<AbstractClass>]
[<ComVisibleAttribute(true)>]
type UITechnologyElementProxy =  
    class 
        inherit UITechnologyElement 
    end
public abstract class UITechnologyElementProxy extends UITechnologyElement

UITechnologyElementProxy 类型公开以下成员。

构造函数

  名称 说明
受保护的方法 UITechnologyElementProxy 初始化给定技术管理器的代理元素。

页首

属性

  名称 说明
公共属性 ChildIndex 获得在父元素的集合的基于 0 的位置。 (重写 UITechnologyElement.ChildIndex。)
公共属性 ClassName 获取元素类名。 (重写 UITechnologyElement.ClassName。)
公共属性 ControlTypeName 获取此元素的通用控件类型。 (重写 UITechnologyElement.ControlTypeName。)
公共属性 FriendlyName 获取用户友好名称。如将有助于用户快速识别屏幕上的元素的显示文本一起显示的此元素。 (重写 UITechnologyElement.FriendlyName。)
公共属性 IsLeafNode 获取是否是此元素没有任何子) 的叶节点 (。 (重写 UITechnologyElement.IsLeafNode。)
公共属性 IsPassword 获取一个值是否此元素包含受保护的内容。 (重写 UITechnologyElement.IsPassword。)
公共属性 IsTreeSwitchingRequired 得到树交换是否需要无窗口的树交换情况是必需的。 (重写 UITechnologyElement.IsTreeSwitchingRequired。)
公共属性 Name 获取此元素的名称。 (重写 UITechnologyElement.Name。)
公共属性 NativeElement 获取与对应基础本机方法的元素 (如) IAccessible 此元素。 (重写 UITechnologyElement.NativeElement。)
公共属性 QueryId 获取可用于唯一标识/查找此元素的 QueryId。 在某些情况下,比如,QueryIds TreeItem 可能包含完全元素层次结构,但大多数情况下将元素的祖先只包含重要。 技术管理器必须决定哪捕获的上级层次结构中通过适当设置每个元素 QueryId.Ancestor 属性。 在条件类类似 AndCondition.ToString() 和 AndCondition.Parse() 的 API 可能用于从该类转换字符串反之亦然。 EXT-PROTO1-NOTES:此 QID 递归将转换所有上级核心技术元素移入扩展元素并正确拼结上级层次结构。 (重写 UITechnologyElement.QueryId。)
公共属性 SupportLevel (继承自 UITechnologyElement。)
公共属性 SwitchingElement 如果一种承载于另一种技术中,获取或设置容器元素。 框架使用。 (重写 UITechnologyElement.SwitchingElement。)
公共属性 TechnologyManager 获取与对应的技术管理器。 (重写 UITechnologyElement.TechnologyManager。)
公共属性 TechnologyName 获取与对应的方法的名称。 此值应与 UITechnologyManager.TechnologyName 相同。 (重写 UITechnologyElement.TechnologyName。)
公共属性 TopLevelElement 获取或设置该顶级窗口与元素对应。顶级窗口通常是桌面的子级。如果没有设置,则框架将设置此到元素的最顶端的上级 (在忽略作为父的桌面之后)。 (重写 UITechnologyElement.TopLevelElement。)
公共属性 Value 获取此值元素。 (重写 UITechnologyElement.Value。)
公共属性 WindowHandle 获取包含此元素的 Win32 窗口的句柄。 (重写 UITechnologyElement.WindowHandle。)
公共属性 WindowTitles (继承自 UITechnologyElement。)

页首

方法

  名称 说明
公共方法 CacheProperties 缓存此元素的所有通用属性后使用,这样以后可以使用这些属性,即使当下划线的 UI 控件不再存在。 这通常包括如名称、ClassName、在身份字符串和其他属性的属性 ControlType、QueryId。 (重写 UITechnologyElement.CacheProperties()。)
公共方法 EnsureVisibleByScrolling 此元素的滚动到视图中。 如果技术管理器不支持滚动多个容器,则应返回 outPointX 和 outPointY 为 -1,-1。 (重写 UITechnologyElement.EnsureVisibleByScrolling(Int32, Int32, Int32%, Int32%)。)
公共方法 Equals(Object) 确定指定的对象是否等于当前对象。 (重写 Object.Equals(Object)。)
公共方法 Equals(IUITechnologyElement) 确定指定的对象是否等于当前对象。 (重写 UITechnologyElement.Equals(IUITechnologyElement)。)
受保护的方法 Finalize 在垃圾回收将某一对象回收前允许该对象尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetBoundingRectangle 获取完全封闭此矩形元素的坐标。 (重写 UITechnologyElement.GetBoundingRectangle(Int32%, Int32%, Int32%, Int32%)。)
公共方法 GetClickablePoint 获取此元素的可单击点。框架将使用此 UITechnologyElement.GetOption 获取点 (UITechnologyElementOption.GetClickablePointFrom) 是否返回 GetClickablePointFromTechnologyManager。框架使用默认算法提供的,NotSupportedException 引发。 (重写 UITechnologyElement.GetClickablePoint(Int32%, Int32%)。)
公共方法 GetHashCode 获取此对象的哈希代码。 如果等于,重写,.NET 设计指导原则建议太重写此。 (重写 Object.GetHashCode。)
公共方法 GetNativeControlType 获取此元素的本机控件类型。当 ControlType 不区分控件时,可以通过 GetControlType() 足够的使用与获取的常规类型相适应。 例如,如果本地的技术元素,包括 HTML,则可能是标记名称。 (重写 UITechnologyElement.GetNativeControlType(NativeControlTypeKind)。)
公共方法 GetOption 获取此 IUITechnologyElement 的选项。 (重写 UITechnologyElement.GetOption(UITechnologyElementOption)。)
公共方法 GetPropertyValue 获取指定的此元素的属性的值。 (重写 UITechnologyElement.GetPropertyValue(String)。)
公共方法 GetQueryIdForRelatedElement 获取指定的 UITestElementKind 相关的元素 QueryId。 (重写 UITechnologyElement.GetQueryIdForRelatedElement(UITestElementKind, Object, Int32%)。)
公共方法 GetRequestedState 获取此元素的当前状态信息的请求状态的。 如果元素不支持查询仅在选择状态,则可返回完整状态信息。 (重写 UITechnologyElement.GetRequestedState(AccessibleStates)。)
公共方法 GetRightToLeftProperty 获取 true/false 值为从右向左格式基于指定的类型。 (重写 UITechnologyElement.GetRightToLeftProperty(RightToLeftKind)。)
公共方法 GetScrolledPercentage 获取滚动以百分比量。 (重写 UITechnologyElement.GetScrolledPercentage(ScrollDirection, IUITechnologyElement)。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 InitializeProgrammaticScroll 此初始化元素执行编程滚动。 (重写 UITechnologyElement.InitializeProgrammaticScroll()。)
公共方法 InvokeProgrammaticAction 此元素根据传递的,ProgrammaticActionOption 以编程方式操作。 (重写 UITechnologyElement.InvokeProgrammaticAction(ProgrammaticActionOption)。)
公共方法 IsInteractable (继承自 UITechnologyElement。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 PerformKeyboardAction (继承自 UITechnologyElement。)
公共方法 PerformMouseAction (继承自 UITechnologyElement。)
公共方法 ScrollProgrammatically 为此元素的编程中滚动。 (重写 UITechnologyElement.ScrollProgrammatically(ScrollDirection, ScrollAmount)。)
公共方法 SetFocus 将此元素的焦点。 (重写 UITechnologyElement.SetFocus()。)
公共方法 SetOption 将此 IUITechnologyElement 的选项。 (重写 UITechnologyElement.SetOption(UITechnologyElementOption, Object)。)
公共方法 SetPropertyValue 执行一个 SetProperty 事件 (继承自 UITechnologyElement。)
公共方法 ToString 获取控件的字符串表示形式。 (重写 Object.ToString。)
公共方法 WaitForReady 等待元素就绪用户操作。 (重写 UITechnologyElement.WaitForReady()。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.TestTools.UITesting 命名空间