Export (0) Print
Expand All

UITestControl Class

This class provides the ability to locate controls on a User Interface. It provides properties and methods that are generic to controls across technologies.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

'Declaration
Public Class UITestControl

The UITestControl type exposes the following members.

  NameDescription
Public methodUITestControlInitializes a new instance of the UITestControl class.
Public methodUITestControl(UITestControl)Initializes a new instance of the UITestControl class and specifies the container for locating controls.
Top

  NameDescription
Public propertyBoundingRectangleGets the Bounding rectangle for this control.
Public propertyClassNameGets the class name for this control.
Public propertyContainerGets or sets the container of this UITestControl.
Public propertyControlTypeGets the type of the UI Control.
Public propertyStatic memberDesktopGets the UI Control for the desktop.
Public propertyEnabledGets a value that indicates whether this control is enabled.
Public propertyExistsGets a value that indicates whether this control exists on the user interface.
Public propertyFilterPropertiesGets the property-value pair collection that is used to disambiguate a control.
Public propertyFriendlyNameGets the name of this control to use in the user interface.
Public propertyHasFocusGets a value that indicates whether this control currently has the focus in the user interface.
Public propertyIsTopParentGets a value that indicates whether this control is the top-level element.
Public propertyNameGets the name of this control.
Public propertyNativeElementGets the native technology element that corresponds to this control.
Public propertySearchConfigurationsGets or sets search configurations.
Public propertySearchPropertiesGets the property-value pair collection that is used to identify a control.
Protected propertySearchPropertiesSetExplicitlyGets a value that indicates whether the search properties for this control were set by the user in the user interface.
Public propertyTechnologyNameGets or sets the technology framework that implements this control.
Public propertyTopParentGets the top-level parent of this control.
Public propertyWindowHandleGets the window handle for this control.
Public propertyWindowTitlesGets a collection of the window titles of the top-level window.
Top

  NameDescription
Public methodCaptureImageCaptures the image of the UITestControl. The UITestControl must be present on the screen.
Public methodCopyFromCreates a UITestControl object that references the same element on the user interface as the original UITestControl.
Public methodDrawHighlightHighlights the control.
Public methodEnsureClickableScrolls the user interface to make sure that the control is clickable.
Public methodEnsureClickable(Point)Scrolls the user interface to a specific point to make sure that the control is clickable.
Public methodEqualsDetermines whether the specified UITestControl is equal to the current UITestControl. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindFinds the UITestControl.
Public methodFindMatchingControlsReturns a collection of all UITestControls that match the specified SearchProperties and FilterProperties.
Public methodGetChildrenReturns a collection of all first-level children of the current UITestControl.
Public methodGetClickablePointReturns a clickable point on the control.
Public methodGetHashCodeReturns a unique value that represents the current UITestControl instance. (Overrides Object.GetHashCode.)
Public methodGetParentReturns the parent of the current UITestControl.
Public methodGetPropertyGets the value of the specified property.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetUITestControlsForSearchReturns an array of UITestControl objects that will be used for searching.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetFocusSets the keyboard focus to the UITestControl.
Public methodSetPropertySets the value of a given property.
Public methodToStringReturns a String that represents the current UITestControl. (Overrides Object.ToString.)
Public methodTryGetClickablePointReturns a clickable point in the UITestControl. If the control is not clickable, this method returns false.
Public methodStatic memberWaitForCondition(Of T)(T, Predicate(Of T))Blocks the current thread until the specified condition is met, or until the default time-out expires.
Public methodStatic memberWaitForCondition(Of T)(T, Predicate(Of T), Int32)Blocks the current thread until the specified condition is met, or until the specified time-out expires.
Public methodWaitForControlCondition(Predicate(Of UITestControl))Blocks the current thread until this control meets the specified condition, or until the default time-out expires.
Public methodWaitForControlCondition(Predicate(Of UITestControl), Int32)Blocks the current thread until this control meets the specified condition, or until the specified time-out expires.
Public methodWaitForControlEnabledBlocks the current thread until this control is enabled, or until the default time-out expires.
Public methodWaitForControlEnabled(Int32)Blocks the current thread until this control is enabled, or until the specified time-out expires.
Public methodWaitForControlExistBlocks the current thread until this control occurs in the user interface, or until the default time-out expires.
Public methodWaitForControlExist(Int32)Blocks the current thread until this control occurs in the user interface, or until the specified time-out expires.
Public methodWaitForControlNotExistBlocks the current thread until this control no longer exists in the user interface, or until the default time-out expires.
Public methodWaitForControlNotExist(Int32)Blocks the current thread until this control no longer occurs in the user interface, or until the specified time-out expires.
Public methodWaitForControlPropertyEqual(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.
Public methodWaitForControlPropertyEqual(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.
Public methodWaitForControlPropertyNotEqual(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.
Public methodWaitForControlPropertyNotEqual(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.
Public methodWaitForControlReadyBlocks the current thread until this control is ready to receive mouse or keyboard input, or until the default time-out expires.
Public methodWaitForControlReady(Int32)Blocks the current thread until this control is ready to receive mouse or keyboard input, or until the specified time-out expires.
Top

  NameDescription
Public operatorStatic memberEqualityIndicates whether two UITestControl instances are equal.
Public operatorStatic memberInequalityIndicates whether two UITestControl instances are not equal.
Top

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

Community Additions

ADD
Show:
© 2014 Microsoft