Version

xamDataPresenter - Replay-Only Methods

Topic Overview

Purpose

This topic provides reference information about the replay-only user methods for testing the xamDataPresenter™ controls.

xamDataPresenter Test Object Replay-Only Methods

Replay-only methods summary chart

The following table briefly explains the replay-only methods for testing the control. Detailed information about the methods is provided below the table.

Method Description

CellEnterEditMode

Sets the specified cell in edit mode.

GetCellData

Returns the value of the specified cell.

GetSummaryText

Returns the content of all summaries for a field.

GetSummaryType

Returns the summary type for a field.

GetSummaryValue

Returns the summary value for a field.

CellEnterEditMode

Description

The CellEnterEditMode method sets the specified cell in edit mode.

Details

The method accepts as a parameter the cell path in the active field layout.

The cell path is formed in the following way:

  • {record path}[field name]

This method validates the specified cell path, activates the cell, checks if the editing is enabled. After that performs an action to set the cell in edit mode.

Parameters

The following table explains the method’s parameters along with some sample code.

Method parameter Description

Cell path

This method uses the cell path as a parameter.

Example

Setting a cell from the third record and a field “name” in edit mode:

WpfWindow("MainWindow").XamDataGrid("XamDataGrid1").CellEnterEditMode "{3}[name]"

Default setting

No default settings.

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 is not format correctly.

Method parameter is not correct.

The following item was not found.

The specified cell cannot be located when replaying the method.

Method parameter is not correct.

Unable to enter edit mode.

The cell cannot be set in edit mode when replaying the method.

Editing is disabled.

Element is not visible

The cell doesn’t exist or is hidden.

The point required to perform the operation is not visible.

GetCellData

Description

The GetCellData method returns the value of the specified cell.

Details

The method accepts as a parameter the cell path in the active field layout.

The cell path is formed in the following way:

  • {record path}[field name]

This method validates the specified cell path and returns the cell value.

Parameters

The following table explains the method’s parameters along with some sample code.

Method parameter Description

Cell path

This method uses the cell path as a parameter.

Example

Displaying the message box with the value of a cell:

msgbox(WpfWindow("MainWindow").XamDataGrid("XamDataGrid1").GetCellData "{3}[name]")

Default setting

No default settings.

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 is not format correctly.

Method parameter is not correct.

The following item was not found.

The specified cell cannot be located when replaying the method.

Method parameter is not correct.

GetSummaryText

Description

The GetSummaryText method returns as a string all summaries for a field.

Details

The method accepts as a parameter the cell path to identify the field which summary text will be retrieved.

The cell path is formed in the following way:

  • {record path}[field name]

This method validates the specified cell path, checks if field summary is enabled and returns the entire content of the summary.

Parameters

The following table explains the method’s parameters along with some sample code.

Method parameter Description

Cell path

This method uses the cell path as a parameter.

Example

Displaying a message box with the content of the summary for the field “amount” :

msgbox(WpfWindow("MainWindow").XamDataGrid("XamDataGrid1").GetSummaryText ("{0}[amount]"))

Default setting

No default settings.

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 is not format correctly

Method parameter is not correct.

The following item was not found.

The specified cell cannot be located when replaying the method.

Method parameter is not correct.

Summaries are not allowed for the supplied field.

The summaries are not allowed and the summary text cannot be retrieved.

Summaries are not enabled for the specified cell field.

No summaries for the supplied field.

There are no summaries for a field and method replaying fails.

There are no summaries to be retrieved.

GetSummaryType

Description

The GetSummaryType method returns the type of the summary for a field (for example “Average”, “Count”, “Sum” and so on).

Details

This method takes a cell path as a required parameter and it identifies a field with summary.

The cell path is formed in the following way:

  • {record path}[field name]

The optional parameter specifies which successive summary type to be returned in case there are several summaries performed on a field.

Parameters

The following table explains the method’s parameters along with some sample code.

Method parameter Description
  • Cell path

  • Index

(optional)

The cell path parameter is a required parameter and identifies the field which summary type will be retrieved.

The index parameter is optional and is used to specify which successive summary type to be retrieved in case there is more than one.

Example

Displaying a message box with the second summary’s type for the field “amount” :

msgbox(WpfWindow("MainWindow").XamDataGrid("XamDataGrid1").GetSummaryType("{0}[amount]", 1))

Default setting

No default settings.

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 is not format correctly

Method parameter is not correct.

The following item was not found.

The specified cell cannot be located when replaying the method.

Method parameter is not correct.

Summaries are not allowed for the supplied field.

The summaries are not allowed and the summary text cannot be retrieved.

Summaries are not enabled for the specified cell field.

No summaries for the supplied field.

There are no summaries for a field and method replaying fails.

There are no summaries to be retrieved.

GetSummaryValue

Description

The GetSummaryValue method returns the summary value for a specifed field.

Details

This method takes a cell path as a required parameter and it identifies a field with summary.

The cell path is formed in the following way:

  • {record path}[field name]

The optional parameter specifies which successive summary value to be returned in case there are several summaries performed on a field.

Parameters

The following table explains the method’s parameters along with some sample code.

Method parameter Description
  • Cell path

  • Index

(optional)

The cell path parameter is a required parameter and identifies the field which summary value will be retrieved.

The index parameter is optional and is used to specify which successive summary value to be retrieved in case there is more than one.

Example

Displaying a message box with the second summary’s value for the field “amount” :

msgbox(WpfWindow("MainWindow").XamDataGrid("XamDataGrid1").GetSummaryValue("{0}[amount]", 1))

Default setting

No default settings.

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 is not format correctly

Method parameter is not correct.

The following item was not found.

The specified cell cannot be located when replaying the method.

Method parameter is not correct.

Summaries are not allowed for the supplied field.

The summaries are not allowed and the summary text cannot be retrieved.

Summaries are not enabled for the specified cell field.

No summaries for the supplied field.

There are no summaries for a field and method replaying fails.

There are no summaries to be retrieved.

Topics

The table below lists other topics you may find useful.

Topic Purpose

This topic provides information about the user actions of the xamDataPresenter controls which you can test and the elements you can inspect.

This topic provides reference information about the recordable user methods for testing the xamDataPresenter controls.

This topic provides reference information about the inspectable test object properties of the xamDataPresenter controls.

This topic provides reference information about the proxy class that supports the testing of the xamDataPresenter controls in Micro Focus Unified Functional Testing software.