Version

Setting the Focus of the Application

Topic Overview

Purpose

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).

Introduction

Setting the focus summary

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).

SetFocus Method

Description

The SetFocus method sets the focus of the application to the specified control.

Supported controls

All Infragistics controls.

Parameters

No parameters are passed to this method.

Example

Setting application focus on an instance of the xamDataGrid control named MyGrid:

WpfWindow("MainWindow").XamDataGrid("MyGrid").SetFocus

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides reference information about the methods for accessing the properties and sub-properties of Infragistics controls.

This topic provides reference information about the methods for emulating of panning and zooming actions on Infragistics controls.

This topic provides reference information about the methods for mouse action emulation on Infragistics controls.