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 | |
---|---|---|
UITechnologyElement | Initializes a new instance of the UITechnologyElement class. |
Top
Properties
Name | Description | |
---|---|---|
ChildIndex | Gets the zero-based position in the collection of child elements of the parent element. | |
ClassName | Gets the class name of this element as assigned by the developer. | |
ControlTypeName | Gets the universal control type of this element. | |
FriendlyName | Gets the friendly name for this element for display in the user interface. | |
IsLeafNode | Gets a value that indicates whether this element is a leaf node, which means that it has no children. | |
IsPassword | Gets a value that indicates whether this element contains protected content. | |
IsTreeSwitchingRequired | Gets a value that indicates whether tree switching is required for windowless tree switching cases. | |
Name | Gets the name of this element. | |
NativeElement | Gets the underlying native technology element, such as IAccessible, that corresponds to this element. | |
QueryId | Gets an identifier object that can be used to uniquely identify and find this element. | |
SupportLevel | Gets a value that is used by the test recording and playback engine to find a matching UITechnologyManager for this element. | |
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. | |
TechnologyManager | Gets the current technology manager. | |
TechnologyName | Gets the name of the corresponding technology of this element. | |
TopLevelElement | Gets or sets the top-level window for this element. | |
Value | Gets or sets the value of this element as a string. | |
WindowHandle | Gets the handle to the Win32 window that contains this element. | |
WindowTitles | Gets a list of the top-level window titles, of which one is the ancestor of this element. |
Top
Methods
Name | Description | |
---|---|---|
CacheProperties | Caches all the common properties of this element for future use. | |
EnsureVisibleByScrolling | Scrolls this element into view in the UI. | |
Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Equals(IUITechnologyElement) | Returns a value that indicates whether the provided object is equal to this element. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBoundingRectangle | Returns the coordinates of the rectangle that encloses this element. | |
GetClickablePoint | Gets a clickable point for this element. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetNativeControlType | Returns the native control type of this element. | |
GetOption | Returns the specified option for this element. | |
GetPropertyValue | Returns the value of the specified property for this element. | |
GetQueryIdForRelatedElement | Returns the query ID for a related element. | |
GetRequestedState | Returns the current state information for the given requested states for this element. | |
GetRightToLeftProperty | Returns a value that indicates whether this element has the specified kind of left-to-right format. | |
GetScrolledPercentage | Returns the amount that is scrolled as a percentage of the size of the scrollbar. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InitializeProgrammaticScroll | Initializes this element for programmatic scrolling. | |
InvokeProgrammaticAction | Performs programmatic action by using the provided option. | |
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. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ScrollProgrammatically | Programmatically scrolls this element by using the provided direction and an indication of the amount. | |
SetFocus | Sets the UI focus on this element. | |
SetOption | Sets the value of the specified option in this element. | |
SetPropertyValue | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WaitForReady | Waits for this element to be ready for user action. |
Top
Fields
Name | Description | |
---|---|---|
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
Other Resources
Extending Coded UI Tests and Action Recordings to Support Microsoft Excel