Sample Excel Extension: ActionFilter Class

This internal class extends the UITestActionFilter class and represents a filter for test actions on a Microsoft Excel element.

Simple Properties

These read-only properties enable the developer to specify how this test action filter is to be executed by the coded UI testing framework. For example, the Name property provides the name of the action filter. Other properties get the Category of the action filter, the FilterType, the Group name for the test actions that are filtered by this test action filter. Others indicate whether to ApplyTimeout and also whether the test action is Enabled.

ProcessRule Method

This method is called by the coded UI testing framework, and executes the filter against the provided IUITestActionStack. This particular override removes a mouse click action on a cell when the next action in the stack sends keystrokes to the cell. It then returns false.

Private Methods

The IsLeftClick method determines whether the provided action represents a left-click of the mouse. The AreActionsOnSameExcelCell method determines whether two provided actions are executed on the same cell in Excel.

See Also

Reference

UITestActionFilter

IUITestActionStack

Concepts

Extending Coded UI Tests and Action Recordings to Support Microsoft Excel