The following table briefly explains the recordable methods for testing the control. Detailed information about the methods is provided in the text blocks following the table.
Method
Description
SetCellData
Sets a new value to the specified cell.
SetInvalidDataCell
Types a string into a cell with a text based editor.
SetCellData
Description
The SetCellData method is used for recording and replaying the cell editing action performed by the user.
Details
When replaying, this method performs some validations first and then edits the cell value:
Validating the specified cell path,
Setting the new supplied value in the cell,
Exiting the edit mode
The method accepts as parameters the cell path and the new value to be set.
The path is formed by concatenating the record path and the field name or field index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Cell path
The new cell value
Using the cell path and the value to be set as parameters.
Example
Setting a new value in the cell in the “Isbn” field:
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 is not format correctly.
The method parameter is not correctly formatted.
The following item was not found.
The specified item cannot be located when replaying the method.
The method parameter is not correct.
Unable to enter edit mode.
Editing of the cell is not enabled and the replaying the method fails.
The editing is not enabled.
The element is not visible.
The cell to be edited is not visible and replaying the method fails.
The cell doesn’t exist or is hidden.
SetInvalidDataCell
Description
The SetInvalidDataCell method is used for recording and replaying typing a new value in the specified cell with a text based editor.
Details
When replaying, this method performs some validations first and then sets the cell to Edit mode:
Validating the specified cell path,
Triggering the CellEnterEditMode event,
Filling the editor with the specified value,
Exiting the Edit mode
The method takes the cell path and the new value to be set as parameters.
The path is formed by concatenating the record path and the field name or field index (the parenthesis and the brackets are part of the syntax):
{record path}[field name or field index]
For example, the cross-section of the first record and the field name is denoted as {0}[name], the cross-section of the first child record of the first record and the field name is denoted as {0}{0}[name] .
Parameters
The following table explains the method’s parameters along with some sample code.
Method parameter
Description
Cell path
The new cell value
Using the cell path and the value to be set as parameters.
This topic provides reference information about the recordable user methods for testing the navigation and selection actions in xamDataPresenter controls.
This topic provides reference information about the recordable user methods for testing the sorting and grouping user actions in xamDataPresenter controls.