This topic provides reference information about the methods for setting the application’s focus directly on a control (without emulating any mouse or key actions).
Test Automation supports two approaches to setting the focus in your application:
by emulating the respective user actions that set the focus (user mouse and keyboard actions)
by setting the focus directly to the desired object. This is done with a special method called SetFocus . (See SetFocus Method).
The SetFocus method sets the focus of the application to the specified control.
All Infragistics controls.
No parameters are passed to this method.
Setting application focus on an instance of the xamDataGrid control named MyGrid:
WpfWindow("MainWindow").XamDataGrid("MyGrid").SetFocus
The following topics provide additional information related to this topic.