UITechnologyManager.GetFocusedElement Method

Returns the windows pointer for the element that currently has the focus.

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

Syntax

'Declaration
Public MustOverride Function GetFocusedElement ( _
    handle As IntPtr _
) As IUITechnologyElement
public abstract IUITechnologyElement GetFocusedElement(
    IntPtr handle
)
public:
virtual IUITechnologyElement^ GetFocusedElement(
    IntPtr handle
) abstract
abstract GetFocusedElement : 
        handle:IntPtr -> IUITechnologyElement
public abstract function GetFocusedElement(
    handle : IntPtr
) : IUITechnologyElement

Parameters

  • handle
    Type: IntPtr

    The IntPtr for the window that has the focus.

Return Value

Type: Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
The element that has the focus, or nulla null reference (Nothing in Visual Basic) if no element has the focus.

Implements

IUITechnologyManager.GetFocusedElement(IntPtr)

.NET Framework Security

See Also

Reference

UITechnologyManager Class

Microsoft.VisualStudio.TestTools.UITest.Extension Namespace