Partager via


UITechnologyManagerProxy.GetFocusedElement Method

Gets the focused element that is the element that will receive keyboard events at this instance.

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

Syntax

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

Parameters

  • handle
    Type: IntPtr

    The handle of the window which has the focus.

Return Value

Type: Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
The element that has the focus or null if there is no element that has focus.

Implements

IUITechnologyManager.GetFocusedElement(IntPtr)

.NET Framework Security

See Also

Reference

UITechnologyManagerProxy Class

Microsoft.VisualStudio.TestTools.UITesting Namespace