Share via


UIMap.GetTopLevelElement Method

Returns the top element that contains the provided UI object.

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

Syntax

'Declaration
Public Function GetTopLevelElement ( _
    uiObject As UIObject _
) As TopLevelElement
public TopLevelElement GetTopLevelElement(
    UIObject uiObject
)
public:
TopLevelElement^ GetTopLevelElement(
    UIObject^ uiObject
)
member GetTopLevelElement : 
        uiObject:UIObject -> TopLevelElement 
public function GetTopLevelElement(
    uiObject : UIObject
) : TopLevelElement

Parameters

Return Value

Type: Microsoft.VisualStudio.TestTools.UITest.Common.UIMap.TopLevelElement
The top-level element.

.NET Framework Security

See Also

Reference

UIMap Class

Microsoft.VisualStudio.TestTools.UITest.Common.UIMap Namespace

UIObject

TopLevelElement