UITestControl 类

UITestControl 可以查找控件用户界面。它提供了泛型于不同技术中的控件的属性和方法。

继承层次结构

Object
  Microsoft.VisualStudio.TestTools.UITesting.UITestControl
    Microsoft.VisualStudio.TestTools.UITesting.ApplicationBase
    Microsoft.VisualStudio.TestTools.UITesting.DirectUIControls.DirectUIControl
    Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl
    Microsoft.VisualStudio.TestTools.UITesting.WindowsRuntimeControls.XamlControl
    Microsoft.VisualStudio.TestTools.UITesting.WindowsRuntimeControls.XamlWebView

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

语法

声明
<CLSCompliantAttribute(True)> _
Public Class UITestControl
[CLSCompliantAttribute(true)]
public class UITestControl
[CLSCompliantAttribute(true)]
public ref class UITestControl
[<CLSCompliantAttribute(true)>]
type UITestControl =  class end
public class UITestControl

UITestControl 类型公开以下成员。

构造函数

  名称 说明
公共方法 UITestControl()
公共方法 UITestControl(UITestControl)

页首

属性

  名称 说明
公共属性 BoundingRectangle
公共属性 ClassName
公共属性 Container
公共属性 ControlType
公共属性静态成员 Desktop
公共属性 Enabled
公共属性 Exists
公共属性 FilterProperties
公共属性 FriendlyName
公共属性 HasFocus
公共属性 Height
公共属性 IsTopParent
公共属性 Left
公共属性 Name
公共属性 NativeElement
公共属性 SearchConfigurations
公共属性 SearchProperties
受保护的属性 SearchPropertiesSetExplicitly
公共属性 State
公共属性 TechnologyName
公共属性 Top
公共属性 TopParent
公共属性 Width
公共属性 WindowHandle
公共属性 WindowTitles

页首

方法

  名称 说明
公共方法 CaptureImage
公共方法 CopyFrom
公共方法 DrawHighlight
公共方法 EnsureClickable()
公共方法 EnsureClickable(Point)
公共方法 EnsureClickable(Point)
公共方法 Equals (重写 Object.Equals(Object)。)
受保护的方法 Finalize 在垃圾回收将某一对象回收前允许该对象尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 Find
公共方法 FindMatchingControls
公共方法 GetChildren
公共方法 GetClickablePoint
公共方法 GetHashCode (重写 Object.GetHashCode。)
公共方法 GetParent
公共方法 GetProperty
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 GetUITestControlsForSearch
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 SetFocus
公共方法 SetProperty
公共方法 ToString (重写 Object.ToString。)
公共方法 TryFind
公共方法 TryGetClickablePoint(Point%)
公共方法 TryGetClickablePoint(Point%)
公共方法静态成员 WaitForCondition<T>(T, Predicate<T>)
公共方法静态成员 WaitForCondition<T>(T, Predicate<T>, Int32)
公共方法 WaitForControlCondition(Predicate<UITestControl>)
公共方法 WaitForControlCondition(Predicate<UITestControl>, Int32)
公共方法 WaitForControlEnabled()
公共方法 WaitForControlEnabled(Int32)
公共方法 WaitForControlExist()
公共方法 WaitForControlExist(Int32)
公共方法 WaitForControlNotExist()
公共方法 WaitForControlNotExist(Int32)
公共方法 WaitForControlPropertyEqual(String, Object)
公共方法 WaitForControlPropertyEqual(String, Object, Int32)
公共方法 WaitForControlPropertyNotEqual(String, Object)
公共方法 WaitForControlPropertyNotEqual(String, Object, Int32)
公共方法 WaitForControlReady()
公共方法 WaitForControlReady(Int32)

页首

运算符

  名称 说明
公共运算符静态成员 Equality
公共运算符静态成员 Inequality

页首

备注

这里不会更新任何内容;请不要在这里添加材料。

线程安全

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

请参阅

参考

Microsoft.VisualStudio.TestTools.UITesting 命名空间