UITechnologyElement Class

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

Inheritance Hierarchy

Object
Microsoft.VisualStudio.TestTools.UITest.Extension.UITechnologyElement
Microsoft.VisualStudio.TestTools.UITesting.UITechnologyElementProxy

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
<GuidAttribute("630624E3-24CA-4059-8D78-DC5E2710F945")> _
Public MustInherit Class UITechnologyElement _
    Implements IUITechnologyElement
[ComVisibleAttribute(true)]
[GuidAttribute("630624E3-24CA-4059-8D78-DC5E2710F945")]
public abstract class UITechnologyElement : IUITechnologyElement
[ComVisibleAttribute(true)]
[GuidAttribute(L"630624E3-24CA-4059-8D78-DC5E2710F945")]
public ref class UITechnologyElement abstract : IUITechnologyElement
[<AbstractClass>]
[<ComVisibleAttribute(true)>]
[<GuidAttribute("630624E3-24CA-4059-8D78-DC5E2710F945")>]
type UITechnologyElement =  
    class 
        interface IUITechnologyElement 
    end
public abstract class UITechnologyElement implements IUITechnologyElement

The UITechnologyElement type exposes the following members.

Constructors

Name Description
Protected method UITechnologyElement Initializes a new instance of the UITechnologyElement class.

Top

Properties

Name Description
Public property ChildIndex Gets the zero-based position in the collection of child elements of the parent element.
Public property ClassName Gets the class name of this element as assigned by the developer.
Public property ControlTypeName Gets the universal control type of this element.
Public property FriendlyName Gets the friendly name for this element for display in the user interface.
Public property IsLeafNode Gets a value that indicates whether this element is a leaf node, which means that it has no children.
Public property IsPassword Gets a value that indicates whether this element contains protected content.
Public property IsTreeSwitchingRequired Gets a value that indicates whether tree switching is required for windowless tree switching cases.
Public property Name Gets the name of this element.
Public property NativeElement Gets the underlying native technology element, such as IAccessible, that corresponds to this element.
Public property QueryId Gets an identifier object that can be used to uniquely identify and find this element.
Public property SupportLevel Gets a value that is used by the test recording and playback engine to find a matching UITechnologyManager for this element.
Public property SwitchingElement Gets 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 property TechnologyManager Gets the current technology manager.
Public property TechnologyName Gets the name of the corresponding technology of this element.
Public property TopLevelElement Gets or sets the top-level window for this element.
Public property Value Gets or sets the value of this element as a string.
Public property WindowHandle Gets the handle to the Win32 window that contains this element.
Public property WindowTitles Gets a list of the top-level window titles, of which one is the ancestor of this element.

Top

Methods

Name Description
Public method CacheProperties Caches all the common properties of this element for future use.
Public method EnsureVisibleByScrolling Scrolls this element into view in the UI.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Equals(IUITechnologyElement) Returns a value that indicates whether the provided object is equal to this element.
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 GetBoundingRectangle Returns the coordinates of the rectangle that encloses this element.
Public method GetClickablePoint Gets a clickable point for this element.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetNativeControlType Returns the native control type of this element.
Public method GetOption Returns the specified option for this element.
Public method GetPropertyValue Returns the value of the specified property for this element.
Public method GetQueryIdForRelatedElement Returns the query ID for a related element.
Public method GetRequestedState Returns the current state information for the given requested states for this element.
Public method GetRightToLeftProperty Returns a value that indicates whether this element has the specified kind of left-to-right format.
Public method GetScrolledPercentage Returns the amount that is scrolled as a percentage of the size of the scrollbar.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeProgrammaticScroll Initializes this element for programmatic scrolling.
Public method InvokeProgrammaticAction Performs programmatic action by using the provided option.
Public method IsInteractable Checks if the element is visible and interactable at this instance. The plugins should overload this generic implementation to be more accurate and performant.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ScrollProgrammatically Programmatically scrolls this element by using the provided direction and an indication of the amount.
Public method SetFocus Sets the UI focus on this element.
Public method SetOption Sets the value of the specified option in this element.
Public method SetPropertyValue
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method WaitForReady Waits for this element to be ready for user action.

Top

Fields

Name Description
Public fieldStatic member AllAccessibleStates A constant value that indicates all states that can be accessed.

Top

Remarks

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.

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.UITest.Extension Namespace

IUITechnologyElement

Other Resources

Extending Coded UI Tests and Action Recordings to Support Microsoft Excel