UITechnologyManager.GetFocusedElement Method

Definition

Overloads

GetFocusedElement(IntPtr)

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

GetFocusedElement(AutomationElement)

GetFocusedElement(IntPtr)

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

public:
 abstract Microsoft::VisualStudio::TestTools::UITest::Extension::IUITechnologyElement ^ GetFocusedElement(IntPtr handle);
public abstract Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement GetFocusedElement (IntPtr handle);
abstract member GetFocusedElement : nativeint -> Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
Public MustOverride Function GetFocusedElement (handle As IntPtr) As IUITechnologyElement

Parameters

handle
IntPtr

nativeint

The IntPtr for the window that has the focus.

Returns

The element that has the focus, or null if no element has the focus.

Implements

Applies to

GetFocusedElement(AutomationElement)

public:
 virtual Microsoft::VisualStudio::TestTools::UITest::Extension::IUITechnologyElement ^ GetFocusedElement(System::Windows::Automation::AutomationElement ^ ceilingElement);
public virtual Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement GetFocusedElement (System.Windows.Automation.AutomationElement ceilingElement);
abstract member GetFocusedElement : System.Windows.Automation.AutomationElement -> Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
override this.GetFocusedElement : System.Windows.Automation.AutomationElement -> Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
Public Overridable Function GetFocusedElement (ceilingElement As AutomationElement) As IUITechnologyElement

Parameters

ceilingElement
AutomationElement

Returns

Applies to