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.
Assembly: Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)
Microsoft.VisualStudio.TestTools.UITesting::UITestControl
Microsoft.VisualStudio.TestTools.UITesting::ApplicationBase
Microsoft.VisualStudio.TestTools.UITesting.HtmlControls::HtmlControl
Microsoft.VisualStudio.TestTools.UITesting.WinControls::WinControl
Microsoft.VisualStudio.TestTools.UITesting.WpfControls::WpfControl
| Name | Description | |
|---|---|---|
![]() | UITestControl() | Initializes a new instance of the UITestControl class. |
![]() | UITestControl(UITestControl^) | Initializes a new instance of the UITestControl class and specifies the container for locating controls. |
| Name | Description | |
|---|---|---|
![]() | BoundingRectangle | Gets the Bounding rectangle for this control. |
![]() | ClassName | Gets the class name for this control. |
![]() | Container | Gets or sets the container of this UITestControl. |
![]() | ControlType | Gets the type of the UI Control. |
![]() ![]() | Desktop | Gets the UI Control for the desktop. |
![]() | Enabled | Gets a value that indicates whether this control is enabled. |
![]() | Exists | Gets a value that indicates whether this control exists on the user interface. |
![]() | FilterProperties | Gets the property-value pair collection that is used to disambiguate a control. |
![]() | FriendlyName | Gets the name of this control to use in the user interface. |
![]() | HasFocus | Gets a value that indicates whether this control currently has the focus in the user interface. |
![]() | Height | Gets height of the control. |
![]() | IsTopParent | Gets a value that indicates whether this control is the top-level element. |
![]() | Left | Gets the x-coordinate of the left edge of the control. |
![]() | Name | Gets the name of this control. |
![]() | NativeElement | Gets the native technology element that corresponds to this control. |
![]() | SearchConfigurations | Gets or sets search configurations. |
![]() | SearchProperties | Gets the property-value pair collection that is used to identify a control. |
![]() | SearchPropertiesSetExplicitly | Gets a value that indicates whether the search properties for this control were set by the user in the user interface. |
![]() | State | Gets the state of the control. |
![]() | TechnologyName | Gets or sets the technology framework that implements this control. |
![]() | Top | Gets the x-coordinate of the top edge of the control. |
![]() | TopParent | Gets the top-level parent of this control. |
![]() | Width | Gets width of the control. |
![]() | WindowHandle | Gets the window handle for this control. |
![]() | WindowTitles | Gets a collection of the window titles of the top-level window. |
| Name | Description | |
|---|---|---|
![]() | CaptureImage() | Captures the image of the UITestControl. The UITestControl must be present on the screen. |
![]() | CopyFrom(UITestControl^) | Creates a UITestControl object that references the same element on the user interface as the original UITestControl. |
![]() | DrawHighlight() | Highlights the control. |
![]() | EnsureClickable() | Scrolls the user interface to make sure that the control is clickable. |
![]() | EnsureClickable(Point) | Scrolls the user interface to a specific point to make sure that the control is clickable. |
![]() | Equals(Object^) | Determines whether the specified UITestControl is equal to the current UITestControl.(Overrides Object::Equals(Object^).) |
![]() | Finalize() | (Inherited from Object.) |
![]() | Find() | Finds the UITestControl. |
![]() | FindMatchingControls() | Returns a collection of all UITestControls that match the specified SearchProperties and FilterProperties. |
![]() | GetChildren() | Returns a collection of all first-level children of the current UITestControl. |
![]() | GetClickablePoint() | Returns a clickable point on the control. |
![]() | GetHashCode() | Returns a unique value that represents the current UITestControl instance.(Overrides Object::GetHashCode().) |
![]() | GetParent() | Returns the parent of the current UITestControl. |
![]() | GetProperty(String^) | Gets the value of the specified property. |
![]() | GetType() | (Inherited from Object.) |
![]() | GetUITestControlsForSearch() | Returns an array of UITestControl objects that will be used for searching. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | SetFocus() | Sets the keyboard focus to the UITestControl. |
![]() | SetProperty(String^, Object^) | Sets the value of a given property. |
![]() | ToString() | Returns a String that represents the current UITestControl.(Overrides Object::ToString().) |
![]() | TryFind() | Tries to find the control on the user interface. |
![]() | TryGetClickablePoint(Point) | Returns a clickable point in the UITestControl. If the control is not clickable, this method returns false. |
![]() ![]() | WaitForCondition<T>(T, Predicate<T>^) | Blocks the current thread until the specified condition is met, or until the default time-out expires. |
![]() ![]() | WaitForCondition<T>(T, Predicate<T>^, Int32) | Blocks the current thread until the specified condition is met, or until the specified time-out expires. |
![]() | WaitForControlCondition(Predicate<UITestControl^>^) | Blocks the current thread until this control meets the specified condition, or until the default time-out expires. |
![]() | WaitForControlCondition(Predicate<UITestControl^>^, Int32) | Blocks the current thread until this control meets the specified condition, or until the specified time-out expires. |
![]() | WaitForControlEnabled() | Blocks the current thread until this control is enabled, or until the default time-out expires. |
![]() | WaitForControlEnabled(Int32) | Blocks the current thread until this control is enabled, or until the specified time-out expires. |
![]() | WaitForControlExist() | Blocks the current thread until this control occurs in the user interface, or until the default time-out expires. |
![]() | WaitForControlExist(Int32) | Blocks the current thread until this control occurs in the user interface, or until the specified time-out expires. |
![]() | WaitForControlNotExist() | Blocks the current thread until this control no longer is in the user interface, or until the default time-out expires. |
![]() | WaitForControlNotExist(Int32) | Blocks the current thread until this control no longer occurs in the user interface, or until the specified time-out expires. |
![]() | WaitForControlPropertyEqual(String^, Object^) | Blocks the current thread until the specified property of this control is equal to the specified value, or until the default time-out expires. |
![]() | WaitForControlPropertyEqual(String^, Object^, Int32) | Blocks the current thread until the specified property of this control is equal to the specified value, or until the specified time-out expires. |
![]() | WaitForControlPropertyNotEqual(String^, Object^) | Blocks the current thread until the specified property of this control is not equal to the specified value, or until the default time-out expires. |
![]() | WaitForControlPropertyNotEqual(String^, Object^, Int32) | Blocks the current thread until the specified property of this control is not equal to the specified value, or until the specified time-out expires. |
![]() | WaitForControlReady() | Blocks the current thread until this control is ready to receive mouse or keyboard input, or until the default time-out expires. |
![]() | WaitForControlReady(Int32) | Blocks the current thread until this control is ready to receive mouse or keyboard input, or until the specified time-out expires. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(UITestControl^, UITestControl^) | Indicates whether two UITestControl instances are equal. |
![]() ![]() | Inequality(UITestControl^, UITestControl^) | Indicates whether two UITestControl instances are not equal. |
No content here will be updated; please do not add material here.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





