IUITechnologyManager.GetFocusedElement Method
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
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
Function GetFocusedElement ( _
handle As IntPtr _
) As IUITechnologyElement
IUITechnologyElement GetFocusedElement(
IntPtr handle
)
IUITechnologyElement^ GetFocusedElement(
IntPtr handle
)
abstract GetFocusedElement :
handle:IntPtr -> IUITechnologyElement
function GetFocusedElement(
handle : IntPtr
) : IUITechnologyElement
Parameters
handle
Type: IntPtrThe 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.