Partager via


UITechnologyElementProxy Class

Proxy UITechnologyElement class. Extension plugins must override this and customize their technology element behavior.

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
Public MustInherit Class UITechnologyElementProxy _
    Inherits UITechnologyElement
[ComVisibleAttribute(true)]
public abstract class UITechnologyElementProxy : UITechnologyElement
[ComVisibleAttribute(true)]
public ref class UITechnologyElementProxy abstract : public UITechnologyElement
[<AbstractClass>]
[<ComVisibleAttribute(true)>]
type UITechnologyElementProxy =  
    class 
        inherit UITechnologyElement 
    end
public abstract class UITechnologyElementProxy extends UITechnologyElement

The UITechnologyElementProxy type exposes the following members.

Constructors

  Name Description
Protected method UITechnologyElementProxy Initializes the proxy element with the given technology manager.

Top

Properties

  Name Description
Public property ChildIndex Gets the 0-based position in the parent element's collection. (Overrides UITechnologyElement.ChildIndex.)
Public property ClassName Gets the class name of this element. (Overrides UITechnologyElement.ClassName.)
Public property ControlTypeName Gets the universal control type of this element. (Overrides UITechnologyElement.ControlTypeName.)
Public property FriendlyName Gets the user-friendly name for this element like display text that will help the user to quickly recognize the element on the screen. (Overrides UITechnologyElement.FriendlyName.)
Public property IsLeafNode Gets whether this element is a leaf node (that is does not have any children) or not. (Overrides UITechnologyElement.IsLeafNode.)
Public property IsPassword Gets a value that indicates whether this element contains protected content or not. (Overrides UITechnologyElement.IsPassword.)
Public property IsTreeSwitchingRequired Gets whether the tree switching is required for window-less tree switching cases. (Overrides UITechnologyElement.IsTreeSwitchingRequired.)
Public property Name Gets the name of this element. (Overrides UITechnologyElement.Name.)
Public property NativeElement Gets the underlying native technology element (like IAccessible) corresponding this element. (Overrides UITechnologyElement.NativeElement.)
Public property QueryId Gets a QueryId that can be used to uniquely identify/find this element. In some cases, such as TreeItem, the QueryIds might contain the complete element hierarchy but most of the time it will contain only important ancestors of the element. The technology manager must decide which ancestor to capture in the hierarchy by appropriately setting the QueryId.Ancestor property of each element. The APIs in condition classes like AndCondition.ToString() and AndCondition.Parse() may be used to convert from this class to string or vice-versa. EXT-PROTO1-NOTES: This QID also recursively converts all the ancestor core technology elements into the extension element and stitches the ancestor hierarchy appropriately. (Overrides UITechnologyElement.QueryId.)
Public property SupportLevel (Inherited from UITechnologyElement.)
Public property SwitchingElement Gets or sets the container element if one technology is hosted inside another technology. This is used by the framework. (Overrides UITechnologyElement.SwitchingElement.)
Public property TechnologyManager Gets the corresponding technology manager. (Overrides UITechnologyElement.TechnologyManager.)
Public property TechnologyName Gets the name of the corresponding technology. This value should be same as UITechnologyManager.TechnologyName. (Overrides UITechnologyElement.TechnologyName.)
Public property TopLevelElement Gets or sets the top level window corresponding to this element. The top level windows are typically children of desktop. If this is not set, the framework will set this to the top-most ancestor of the element (after ignoring the desktop as ancestor). (Overrides UITechnologyElement.TopLevelElement.)
Public property Value Gets the value of this element. (Overrides UITechnologyElement.Value.)
Public property WindowHandle Gets the handle to the Win32 window that contains this element. (Overrides UITechnologyElement.WindowHandle.)
Public property WindowTitles (Inherited from UITechnologyElement.)

Top

Methods

  Name Description
Public method CacheProperties Caches all the common properties of this element for future use so that these properties can be used later even when the underlining UI control no longer exists. This typically includes properties like Name, ClassName, ControlType, QueryId and other properties used in identification string. (Overrides UITechnologyElement.CacheProperties().)
Public method EnsureVisibleByScrolling Scrolls this element into view. If the technology manager does not support scrolling multiple containers, then the outPointX and outPointY should be returned as -1, -1. (Overrides UITechnologyElement.EnsureVisibleByScrolling(Int32, Int32, Int32%, Int32%).)
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Overrides Object.Equals(Object).)
Public method Equals(IUITechnologyElement) Determines whether the specified object is equal to the current object. (Overrides UITechnologyElement.Equals(IUITechnologyElement).)
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 Gets the coordinates of the rectangle that completely encloses this element. (Overrides UITechnologyElement.GetBoundingRectangle(Int32%, Int32%, Int32%, Int32%).)
Public method GetClickablePoint Gets a clickable point for this element. The framework will use this to obtain clickable point if UITechnologyElement.GetOption(UITechnologyElementOption.GetClickablePointFrom) returns GetClickablePointFromTechnologyManager. To use the default algorithm provided by the framework, throw NotSupportedException. (Overrides UITechnologyElement.GetClickablePoint(Int32%, Int32%).)
Public method GetHashCode Gets the hash code for this object. .NET Design Guidelines suggests overriding this too if Equals is overridden. (Overrides Object.GetHashCode.)
Public method GetNativeControlType Gets the native control type of this element. This can be used in tandem with the universal type obtained via GetControlType() when just the ControlType is not enough to differentiate a control. For example, if the native technology element is HTML, this could be the tag name. (Overrides UITechnologyElement.GetNativeControlType(NativeControlTypeKind).)
Public method GetOption Gets the option for this IUITechnologyElement. (Overrides UITechnologyElement.GetOption(UITechnologyElementOption).)
Public method GetPropertyValue Gets the value for the specified property for this element. (Overrides UITechnologyElement.GetPropertyValue(String).)
Public method GetQueryIdForRelatedElement Gets the QueryId for the related element specified by UITestElementKind. (Overrides UITechnologyElement.GetQueryIdForRelatedElement(UITestElementKind, Object, Int32%).)
Public method GetRequestedState Gets the current state information of this element for the given requested states. If the element does not support querying only the selective states, it can return the complete state information. (Overrides UITechnologyElement.GetRequestedState(AccessibleStates).)
Public method GetRightToLeftProperty Gets the true/false value for right to left format based on the kind specified. (Overrides UITechnologyElement.GetRightToLeftProperty(RightToLeftKind).)
Public method GetScrolledPercentage Gets the amount scrolled in percentage. (Overrides UITechnologyElement.GetScrolledPercentage(ScrollDirection, IUITechnologyElement).)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeProgrammaticScroll Initializes this element to do programmatic scrolling. (Overrides UITechnologyElement.InitializeProgrammaticScroll().)
Public method InvokeProgrammaticAction Performs programmatic action, based on the ProgrammaticActionOption passed, on this element. (Overrides UITechnologyElement.InvokeProgrammaticAction(ProgrammaticActionOption).)
Public method IsInteractable (Inherited from UITechnologyElement.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PerformKeyboardAction (Inherited from UITechnologyElement.)
Public method PerformMouseAction (Inherited from UITechnologyElement.)
Public method ScrollProgrammatically Does the programmatic scrolling for this element. (Overrides UITechnologyElement.ScrollProgrammatically(ScrollDirection, ScrollAmount).)
Public method SetFocus Sets the focus on this element. (Overrides UITechnologyElement.SetFocus().)
Public method SetOption Sets the option for this IUITechnologyElement. (Overrides UITechnologyElement.SetOption(UITechnologyElementOption, Object).)
Public method SetPropertyValue Performs a SetProperty action (Inherited from UITechnologyElement.)
Public method ToString Gets the string representation of this control. (Overrides Object.ToString.)
Public method WaitForReady Waits for the element to be ready for user action. (Overrides UITechnologyElement.WaitForReady().)

Top

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.UITesting Namespace