Version

Filtering

Topic Overview

Purpose

This topic provides reference information about the recordable user methods related to the testing of the filtering in the xamGrid™ control.

Recordable Methods

Recordable methods summary chart

The following table summarizes the purpose and functionality of the recordable methods for testing the filtering in the xamGrid control.

Method Description

Deletes the content of the filter cell.

Closes the filtering menu.

Opens the filtering menu.

Sets a filtering comparison operator.

ClearFilterCell

Description

The ClearFilterCell deletes the content of the filter cell.

Details

The ClearFilterCell method is recorded in a test when the end user clicks the filter cell’s Clear button.

When replaying the method:

  1. The specified filter cell path is validated.

  2. If visible, the Clear button is clicked.

The method accepts the path to the filter cell as a parameter.

Parameters

The following table maps the desired configuration to parameters settings.

In order to: Use this parameter: And set it to:

Specify the filter cell to be cleared

sCellArg

The filter cell path

Example

Setting a filter value for the Company column in the xamGrid first and then clearing the the filter.

WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{FILTER}[Company]", "alf"
WpfWindow("WPFApplication1").XamGrid("xamGrid1").ClearFilterCell  "{FILTER}[Company]"

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely to be causing them.

Exception name Exception description Possible reasons

The argument is malformed.

The parameter’s format is incorrect.

The method’s parameter is not in a valid format.

The following item was not found.

The specified item cannot be located when replaying the method.

The method’s parameter is not correct.

The element is not visible.

The item is not visible and replaying the method fails.

The item on which the action is performed either doesn’t exist or is hidden.

CloseFilterMenu

Description

The CloseFilterMenu method closes the filtering menu.

Details

The CloseFilterMenu method is recorded in a test when the column’s filter menu is closed.

When replaying the method:

  1. The specified column header is validated.

  2. A check is performed to verify that filtering is allowed.

  3. The filtering menu closes down.

The method accepts the column header name as a parameter.

Parameters

The following table maps the desired configuration to parameters settings.

In order to: Use this parameter: And set it to:

Specify the filtering menu to close

sHeaderArg

The column header name

Example

Closing the filtering menu of the Company column.

WpfWindow("WPFApplication1").XamGrid("xamGrid1").CloseFilterMenu "[Company]"

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely to be causing them.

Exception name Exception description Possible reasons

The argument is malformed.

The parameter’s format is incorrect.

The method’s parameter is not in a valid format.

The following item was not found.

The specified item cannot be located when replaying the method.

The method’s parameter is not correct.

The element is not visible.

The item is not visible and replaying the method fails.

The item on which the action is performed either doesn’t exist or is hidden.

OpenFilterMenu

Description

The OpenFilterMenu method opens the filtering menu.

Details

The OpenFilterMenu method is recorded in a test when the column’s filter menu is opened.

When replaying the method:

  1. The specified column header is validated.

  2. A check is performed to verify that filtering is allowed.

  3. The filtering menu opens up.

The method accepts as a parameter a column header.

Parameters

The following table maps the desired configuration to parameters settings.

In order to: Use this parameter: And set it to:

Specify the filtering menu to be open

sHeaderArg

The column header name

Example

Opening the filtering menu of the Company column.

WpfWindow("WPFApplication1").XamGrid("xamGrid1").OpenFilterMenu "[Company]"

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely to be causing them.

Exception name Exception description Possible reasons

The argument is malformed.

The parameter’s format is incorrect.

The method’s parameter is not in a valid format.

The following item was not found.

The specified item cannot be located when replaying the method.

The method’s parameter is not correct.

The element is not visible.

The item is not visible and replaying the method fails.

The item on which the action is performed either doesn’t exist or is hidden.

SetFilterCellCompOperator

Description

The SetFilterCellCompOperator method sets a filtering comparison operator.

Details

The SetFilterCellCompOperator method is recorded in a test when a comparison operator is selected from the filter comparison operators combo box.

When replaying the method:

  1. The specified cell path is validated.

  2. The filter comparison operators combo box drops down.

  3. The specified operator is set.

The method accepts as parameters the path to the filter cell and a comparison operator.

Parameters

The following table maps the desired configuration to parameters settings.

In order to: Use this parameter: And set it to:

Specify the path to the filter cell

sFilterCell

The filter cell path

Specify the filtering comparison operator

oCompOperator

A valid option from the IGComparisonOperator enumeration.

Example

Changing the comparison operator to Ends With and filtering the data that ends with en in the Company column.

WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetFilterCellCompOperator "{FILTER}[Company]" ,igcEndsWith
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetCellData "{FILTER}[Company]", "en"

Default setting

No default setting.

Possible exceptions

The following table lists the possible exceptions for the method and the reason that is likely to be causing them.

Exception name Exception description Possible reasons

The argument is malformed.

The parameter’s format is incorrect.

The method’s parameter is not in a valid format.

The following item was not found.

The specified item cannot be located when replaying the method.

The method’s parameter is not correct.

The option supplied is not one of the valid options.

The provided comparison operator is not valid and replaying the method fails.

The method parameter is invalid.

The filter comparison operator menu is not visible in the supplied cell.

The filter comparison operator menu is not visible and replaying the method fails.

The filter comparison operator menu is not visible.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides reference information about the recordable user methods related to the testing of the display features in the xamGrid control.

This topic provides reference information about the recordable user methods related to the testing of the editing in the xamGrid control.

This topic provides reference information about the recordable user methods related to the testing of the navigation and selection in the xamGrid control.

This topic provides reference information about the recordable user methods related to the testing of the sorting and grouping in the xamGrid control.

This topic provides reference information about the recordable user methods related to the testing of the summaries in the xamGrid control.