Compartilhar via


UITestControl Class

UITestControl provides the ability to locate controls on a User Interface. It provides properties and methods which are generic to controls across technologies.

Inheritance Hierarchy

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

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assemblies:   Microsoft.VisualStudio.TestTools.WindowsStore.UITesting (in Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll)
  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
<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

The UITestControl type exposes the following members.

Constructors

  Name Description
Public method UITestControl()
Public method UITestControl(UITestControl)

Top

Properties

  Name Description
Public property BoundingRectangle
Public property ClassName
Public property Container
Public property ControlType
Public propertyStatic member Desktop
Public property Enabled
Public property Exists
Public property FilterProperties
Public property FriendlyName
Public property HasFocus
Public property Height
Public property IsTopParent
Public property Left
Public property Name
Public property NativeElement
Public property SearchConfigurations
Public property SearchProperties
Protected property SearchPropertiesSetExplicitly
Public property State
Public property TechnologyName
Public property Top
Public property TopParent
Public property Width
Public property WindowHandle
Public property WindowTitles

Top

Methods

  Name Description
Public method CaptureImage
Public method CopyFrom
Public method DrawHighlight
Public method EnsureClickable()
Public method EnsureClickable(Point)
Public method EnsureClickable(Point)
Public method Equals (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Find
Public method FindMatchingControls
Public method GetChildren
Public method GetClickablePoint
Public method GetHashCode (Overrides Object.GetHashCode.)
Public method GetParent
Public method GetProperty
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method GetUITestControlsForSearch
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetFocus
Public method SetProperty
Public method ToString (Overrides Object.ToString.)
Public method TryFind
Public method TryGetClickablePoint(Point%)
Public method TryGetClickablePoint(Point%)
Public methodStatic member WaitForCondition<T>(T, Predicate<T>)
Public methodStatic member WaitForCondition<T>(T, Predicate<T>, Int32)
Public method WaitForControlCondition(Predicate<UITestControl>)
Public method WaitForControlCondition(Predicate<UITestControl>, Int32)
Public method WaitForControlEnabled()
Public method WaitForControlEnabled(Int32)
Public method WaitForControlExist()
Public method WaitForControlExist(Int32)
Public method WaitForControlNotExist()
Public method WaitForControlNotExist(Int32)
Public method WaitForControlPropertyEqual(String, Object)
Public method WaitForControlPropertyEqual(String, Object, Int32)
Public method WaitForControlPropertyNotEqual(String, Object)
Public method WaitForControlPropertyNotEqual(String, Object, Int32)
Public method WaitForControlReady()
Public method WaitForControlReady(Int32)

Top

Operators

  Name Description
Public operatorStatic member Equality
Public operatorStatic member Inequality

Top

Remarks

No content here will be updated; please do not add material here.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.UITesting Namespace