UITechnologyElement Class

Provides a base class for implementing a UI test technology element for recording and playing back tests.


Namespace:  Microsoft.VisualStudio.TestTools.UITest.Extension
Assembly:  Microsoft.VisualStudio.TestTools.UITest.Extension (in Microsoft.VisualStudio.TestTools.UITest.Extension.dll)

type UITechnologyElement =  
        interface IUITechnologyElement

The UITechnologyElement type exposes the following members.

Protected methodUITechnologyElementInitializes a new instance of the UITechnologyElement class.

Public propertyChildIndexGets the zero-based position in the collection of child elements of the parent element.
Public propertyClassNameGets the class name of this element as assigned by the developer.
Public propertyControlTypeNameGets the universal control type of this element.
Public propertyFriendlyNameGets the friendly name for this element for display in the user interface.
Public propertyIsLeafNodeGets a value that indicates whether this element is a leaf node, which means that it has no children.
Public propertyIsPasswordGets a value that indicates whether this element contains protected content.
Public propertyIsTreeSwitchingRequired Gets a value that indicates whether tree switching is required for windowless tree switching cases.
Public propertyNameGets the name of this element.
Public propertyNativeElementGets the underlying native technology element, such as IAccessible, that corresponds to this element.
Public propertyQueryIdGets an identifier object that can be used to uniquely identify and find this element.
Public propertySupportLevelGets a value that is used by the test recording and playback engine to find a matching UITechnologyManager for this element.
Public propertySwitchingElementGets or sets the container element if this element is hosted inside an element of another technology. This API supports the test framework infrastructure and is not intended to be used directly from your code.
Public propertyTechnologyManagerGets the current technology manager.
Public propertyTechnologyNameGets the name of the corresponding technology of this element.
Public propertyTopLevelElementGets or sets the top-level window for this element.
Public propertyValueGets or sets the value of this element as a string.
Public propertyWindowHandleGets the handle to the Win32 window that contains this element.
Public propertyWindowTitlesGets a list of the top-level window titles, of which one is the ancestor of this element.

Public methodCachePropertiesCaches all the common properties of this element for future use.
Public methodEnsureVisibleByScrollingScrolls this element into view in the UI.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodEquals(IUITechnologyElement)Returns a value that indicates whether the provided object is equal to this element.
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 methodGetBoundingRectangleReturns the coordinates of the rectangle that encloses this element.
Public methodGetClickablePointGets a clickable point for this element.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetNativeControlTypeReturns the native control type of this element.
Public methodGetOptionReturns the specified option for this element.
Public methodGetPropertyValueReturns the value of the specified property for this element.
Public methodGetQueryIdForRelatedElementReturns the query ID for a related element.
Public methodGetRequestedStateReturns the current state information for the given requested states for this element.
Public methodGetRightToLeftPropertyReturns a value that indicates whether this element has the specified kind of left-to-right format.
Public methodGetScrolledPercentageReturns the amount that is scrolled as a percentage of the size of the scrollbar.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeProgrammaticScrollInitializes this element for programmatic scrolling.
Public methodInvokeProgrammaticActionPerforms programmatic action by using the provided option.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodScrollProgrammaticallyProgrammatically scrolls this element by using the provided direction and an indication of the amount.
Public methodSetFocusSets the UI focus on this element.
Public methodSetOptionSets the value of the specified option in this element.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWaitForReadyWaits for this element to be ready for user action.

Public fieldStatic memberAllAccessibleStatesA constant value that indicates all states that can be accessed.

For sample code that creates a derived class for an extension of the coded UI testing feature, see Extending Coded UI Tests and Action Recordings to Support Microsoft Excel.

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