WpfWindow("WPFApplication1").XamGrid("xamGrid1").ActivateCell "{0}[CustomerID]"
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 contains the following sections:
The following table summarizes the purpose and functionality of the recordable methods for testing the navigation and selection end-user interactions in the xamGrid control.
The ActivateCell method activates a specified cell.
The ActivateCell method is recorded in a test when a xamGrid cell is activated.
When replaying the method:
The cell path is validated.
The cell is activated.
The method accepts the cell path as a parameter.
The path is formed by concatenating the row path and the column key (the parenthesis and the brackets are part of the syntax): {row path}[column key]
For example, the cross-section of the first row and the column key is denoted as {0}[key], the cross-section of the first child row of the first row and the column key is denoted as {0}{0}[key].
The following table maps the desired configuration to its parameters’ settings.
Activating a cell in the first row and CustomerID column.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").ActivateCell "{0}[CustomerID]"
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The ExpandRow method expands a specified row.
The ExpandRow method is recorded in a test when a row is expanded in the xamGrid control.
When replaying the method:
The row path is validated.
The row is expanded.
The method accepts the row path as a parameter.
The path is formed by concatenating the row paths (the parenthesis are part of the syntax): {row path}
The path is formed by concatenating together the parent row’ indexes and the target row’s index; the concatenation goes, left to right, in descending hierarchical order, from the root row index down to the sub-row’s indexes and finally to the target row’s index. If the path consists of more than one index, all indexes must be surrounded by parentheses.
For example:
The target row is the first root row: 0
The target row is the first sub-row of the first root row: {0}{0}
The target row is the third sub-row of the first sub-row of the first root row: {0}{0}{2}
The following table maps the desired configuration to its parameters’ settings.
Expanding the first xamGrid row.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").ExpandRow 0
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The CollapseRow method collapses a specified row.
The CollapseRow method is recorded in a test when a row is collapsed in the xamGrid control.
When replaying the method:
The row path is validated.
The row is collapsed.
The method accepts the row path as a parameter.
The path is formed by concatenating the row paths (the parenthesis are part of the syntax): {row path}
The path is formed by concatenating together the parent row’ indexes and the target row’s index; the concatenation goes, left to right, in descending hierarchical order, from the root row index down to the sub-row’s indexes and finally to the target row’s index. If the path consists of more than one index, all indexes must be surrounded by parentheses.
For example:
The target row is the first root row: 0
The target row is the first sub-row of the first root row: {0}{0}
The target row is the third sub-row of the first sub-row of the first root row: {0}{0}{2}
The following table maps the desired configuration to its parameters’ settings.
Collapsing the first xamGrid row.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").CollapseRow 0
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The Select method selects one or more items of a specified type (column, row or cell).
The Select method is recorded in a test when a xamGrid item is selected. For more information about the selectable xamGrid items, see the xamGrid - Enumeration Reference topic.
When replaying the method:
The selectable item type is verified.
The item path is verified.
The item(s) is/are selected.
The method accepts as parameters the selectable item type and the path to the item.
The following table maps the desired configuration to its parameters’ settings.
Selecting an array of xamGrid cells in the second row and the columns CustomerID and Company.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdCell, Array("{1}[CustomerID]", "{1}[Company]" )
Selecting an array of xamGrid columns – Company and ContactName.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdColumn,Array("[Company]","[ContactName]")
Selecting an array of rows (the first and the second xamGrid row).
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdRow, Array(0,1)
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SelectionAdded method adds one or more xamGrid items of a specified type (column, row or cell) to an existing collection.
The SelectionAdded method is recorded in a test when a particular xamGrid item is selected and added to an existing selection of similar items.
When replaying the method:
The selectable item type is verified.
The path to the item is verified.
The item(s) is/are selected.
The item(s) is/are added to the existing selection.
The method accepts as parameters the selectable item type and the path to the item to be added.
The following table maps the desired configuration to its parameters’ settings.
Adding another cell in an existing selection of cells.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdCell, Array("{1}[CustomerID]", "{1}[Company]" )
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdCell, "{1}[ContactName]"
Adding the ContactTitle column to an existing selection of columns.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdColumn, Array("[Company]","[ContactName]")
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdColumn, "[ContactTitle]"
Adding a row to an existing selection of rows.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").Select xGrdRow, Array(0,1)
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdRow, 2
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SelectionChanged method modifies an existing collection by adding and removing one or more xamGrid items of a specified type (column, row or cell).
The SelectionChanged method is recorded in a test when an existing collection of xamGrid selectable items is changed.
When replaying the method:
The item type of the items that are added is verified.
The paths to the items that are added is verified.
The item type of the items that are removed is verified.
The paths to the items that are removed is verified.
The method accepts as parameters the selectable item type and the path to the item to be removed.
The following table maps the desired configuration to its parameters’ settings.
Adding two cells into selection and removing one of them.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionChanged xGrdCell, Array("{0}[Company]", "{0}[ContactName]"), xGrdCell, "{0}[Company]"
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SelectionRemoved method removes one or more xamGrid items of a specified type (column, row, or cell) from an existing collection.
The SelectionRemoved method is recorded in a test when a particular xamGrid item is selected and removed from an existing selection of similar items.
When replaying the method:
The selectable item type is verified.
The item path is verified.
The item/items is/are removed from the existing selection.
The method accepts as parameters the selectable item type and the path to the item to be removed.
The following table maps the desired configuration to its parameters’ settings.
Creating a selection and then removing a cell from the existing selection of cells.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdCell, Array("{1}[Company]", "{1}[ContactName]")
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionRemoved xGrdCell, "{1}[Company]"
Removing the ContactTitle column from the existing selection of columns.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdColumn, Array("[ContactName]","[ContactTitle]")
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionRemoved xGrdColumn, "[ContactTitle]"
Removing the first row from the existing selection of rows.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionAdded xGrdRow, Array(0,1,2)
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SelectionRemoved xGrdRow, 0
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The SetFixedColumn method sets the position of a column to a specified fixed location.
The SetFixedColumn method is recorded in a test when fixing of a xamGrid column is performed. The fixing of a column can be done either by clicking on the fixed column indicator and by dragging the column into the designated area of the xamGrid control.
When replaying the method:
The specified column header is verified.
The fixed state is verified.
The column fixing should be enabled.
The column is fixed.
The method accepts as parameters column header and fixed state.
The following table maps the desired configuration to its parameters’ settings.
Fixing the Company column in the left xamGrid area.
WpfWindow("WPFApplication1").XamGrid("xamGrid1").SetFixedColumn "[Company]", xGrdLeft
No default setting.
The following table lists the possible exceptions for the method and the reason that is likely to be causing them.
The following topics provide additional information related to this topic.