SAPGuiAPOGrid Object

Description

An APO grid control in an SAP GUI for Windows application.

Operations

The sections below list the built-in methods and properties that you can use as operations for the SAPGuiAPOGrid object.

Note: You can also view a list and descriptions of the SAPGuiAPOGrid description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Method ActivateCellDouble-clicks the specified cell in an APO grid.
Common Method CaptureBitmapSaves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method CheckChecks whether the actual value of an item matches the expected value.
Common Method CheckPropertyChecks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjectsReturns the collection of child objects contained within the object.
Common Method GetAllROProperties

Returns the collection of properties and current values from the object in the application.

Method ClearSelectionClears any selected rows or columns in an APO grid.
Method ColumnCountReturns the number of columns in the APO grid.
Method DeselectCellDeselects the specified cell.
Method DeselectColumnClears the selection of the specified column.
Method DeselectRowClears the selection of the specified row.
Method DeselectRowsRangeDeselects the specified rows in the APO grid.
Method ExtendCellExtends the cell selection to include the specified cell.
Method ExtendColumnSelects an additional column in the APO grid.
Method ExtendRowSelects an additional row in the APO grid.
Method ExtendRowsRangeAdds the specified range of rows to the selected rows in the APO grid.
Method FindAllRowsByCellContentRetrieves all rows of all cells in the given column whose content matches the specified data.
Method FindRowByCellContentRetrieves the first row of the cell in the given column whose content matches the specified data.
Method GetCellDataReturns the data contained in the specified cell

Method GetCellDataEx

Returns a cell's content from a row with specific content in another cell.

Method GetCellFormatRetrieves the type of the specified cell.
Common Method GetROPropertyReturns the current value of the description property from the object in the application.
Common Method GetTOPropertiesReturns the collection of properties and values used to identify the object.
Common Method GetTOPropertyReturns the value of the specified description property from the test object description.
Common Method HighlightHighlights the object in the application.
Method InputRecords an Input statement each time new or modified APO grid cell data is sent to the SAP server.
Method IsCellEditableChecks whether the cell is editable.
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Method PressEnterPresses the ENTER keyboard key when an APO grid control is in focus.
Common Method RefreshObjectInstructs UFT One to re-identify the object in the application the next time a step refers to this object.
Method RowCountReturns the number of rows in the APO grid.
Method SelectAllSelects all cells in the APO grid.
Method SelectCellSelects the specified cell in an APO grid.
Method SelectCellMenuItemRight-clicks the specified cell and selects the specified menu item.
Method SelectColumnSelects the specified column in the APO grid.
Method SelectColumnMenuItemRight-clicks the specified column and selects the specified menu item.
Method SelectRowSelects the specified row in the APO grid.
Method SelectRowsRangeSelects the specified range of rows in the APO grid.
Method SetCellDataSets the cell contents with the specified data.
Common Method SetTOPropertySets the value of the specified description property in the test object description.
Common Method ToStringReturns a string that represents the test object.
Common Method WaitPropertyWaits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property ExistChecks whether the object currently exists in the open application.
Common Property ObjectAccesses the native methods and properties of the object.

Back to top

 

ActivateCell Method

Description

Double-clicks the specified cell in an APO grid.

Syntax

object.ActivateCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to activate. Row numbers begin with 1.
Column Required. A String value.
The column of the cell to activate. The column can be specified by the column's label or column number in the format "#index". Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

ClearSelection Method

Description

Clears any selected rows or columns in an APO grid.

Syntax

object.ClearSelection

Return Type

None.

Example

Back to top

 

ColumnCount Method

Description

Returns the number of columns in the APO grid.

Syntax

object.ColumnCount

Return Type

A Variant.

Example

Back to top

 

DeselectCell Method

Description

Deselects the specified cell.

Syntax

object.DeselectCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to deselect.
Row numbers begin with 1.
Column Required. A String value.
The column to deselect. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

DeselectColumn Method

Description

Clears the selection of the specified column.

Syntax

object.DeselectColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to deselect. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

DeselectRow Method

Description

Clears the selection of the specified row.

Syntax

object.DeselectRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to deselect.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

DeselectRowsRange Method

Description

Deselects the specified rows in the APO grid.

Syntax

object.DeselectRowsRange (StartRow, EndRow)

Arguments

ParameterDescription
StartRow Required. A long integer value.
The number of the first row to deselect.
Row numbers begin with 1.
EndRow Required. A long integer value.
The number of the last row to deselect.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is not recorded. To add this method to your test, use the Step Generator or enter it manually in the Keyword View or Editor. For more information, see the UFT One User Guide.

Example

Back to top

 

ExtendCell Method

Description

Extends the cell selection to include the specified cell.

Syntax

object.ExtendCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to add to the selection.
Row numbers begin with 1.
Column Required. A String value.
The column to add to the selection. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

ExtendColumn Method

Description

Selects an additional column in the APO grid.

Syntax

object.ExtendColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to add to the selection. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

ExtendRow Method

Description

Selects an additional row in the APO grid.

Syntax

object.ExtendRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to add to the selection.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

ExtendRowsRange Method

Description

Adds the specified range of rows to the selected rows in the APO grid.

Syntax

object.ExtendRowsRange (From, To)

Arguments

ParameterDescription
From Required. A long integer value.
The number of the first row to add to the selection.
Row numbers begin with 1.
To Required. A long integer value.
The number of the last row to add to the selection.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

FindAllRowsByCellContent Method

Description

Retrieves all rows of all cells in the given column whose content matches the specified data.

Syntax

object.FindAllRowsByCellContent (Col, CellText)

Arguments

ParameterDescription
Col Required. A Variant.
The column in which you want to search. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
CellText Required. A Variant.
The data for which you want to search.

Return Type

A Variant.

Example

Back to top

 

FindRowByCellContent Method

Description

Retrieves the first row of the cell in the given column whose content matches the specified data.

Syntax

object.FindRowByCellContent (Col, CellText, [StartFromRow])

Arguments

ParameterDescription
Col Required. A Variant.
The column in which you want to search. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
CellText Required. A Variant.
The data for which you want to search.
StartFromRow Optional. A Variant.

The row in which you want the search to start. Row numbers begin with 1.


Default value = 1

Return Type

A Variant.

If no content matches the specified value, the return value is NULL.

Example

Back to top

 

GetCellData Method

Description

Returns the data contained in the specified cell

Syntax

object.GetCellData (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell for which you want to retrieve data.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell for which you want to retrieve data. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

GetCellDataEx Method

Description

Returns a cell's content from a row with specific content in another cell.

This method performs the equivalent of FindRowByCellContent and GetCellData, retrieving the content of the specified column from the first row found with the specified content.

Syntax

object.GetCellDataEx (Column, ByColumn, ByValue, [StartFromRow])

Arguments

ParameterDescription
Column Required. A String value.
The column of the cell for which you want to retrieve data. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.
ByColumn Required. A Variant.
The column in which you want to search for the value specified in the ByValue argument. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
ByValue

Required. A String.

The value for which to search in the column specified in the ByColumn argument.

StartFromRow Optional. A Variant.
The row in which you want the search to start. Row numbers begin with 1.
Default value = 1

Return Type

A Variant.

Example

Back to top

 

GetCellFormat Method

Description

Retrieves the type of the specified cell.

Syntax

object.GetCellFormat (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

Input Method

Description

Records an Input statement each time new or modified APO grid cell data is sent to the SAP server.

Syntax

object.Input (DataSheet, [ScrollMethod])

Arguments

ParameterDescription
DataSheet Required. A String value.
The name of the input data sheet containing the data for the grid.
ScrollMethod Optional. A tagSCROLL_METHOD Value.
The keyboard key that UFT One uses to scroll or add rows to the grid if the input data sheet includes rows that exceed the number of rows currently displayed in the application.
Possible values:
82 or PAGEDOWN: (default) Sends a Page Down key command to scroll the grid.
0 or ENTER: Sends an Enter key command to scroll the grid.
For details on when to use this argument, refer to the "Automatically parameterizing table and grid cell values" topic in the SAP Solutions Add-in section of the UFT One Help Center.
Default value = micPageDown

Return Type

None.

IMPORTANT

This method is recorded only if the Auto-parameterize table and grid controls option is selected in the SAP pane of the Options dialog box.

When the Auto-parameterize table and grid controls option is selected, an Input statement is recorded each time new or modified grid cell data is sent to the SAP server. The statement represents all cell values that were set prior to sending the data to the server.

For each recorded Input method, a corresponding input data sheet is automatically inserted in the test's Data Table as a sub-sheet of the action data sheet containing the recorded cell values. Columns are added to the data sheet only for cells containing input data.

Once the new input data sheet has been created by recording the Input statement, you can add or modify the data set, and add additional data sets for each action iteration.

During the test run, this method inserts the values from the input data sheet specified by the SheetName argument into the grid.

During each action iteration, the values of all cells in the relevant data set of the input data sheet are inserted into the grid according to the row position and column name.

Notes:

You must record the Input method using the Auto-parameterize table and grid controls option to create the input data sheet. You cannot create the required input data sheet manually.

A SelectCell method is automatically recorded after each Input statement.

When the Auto-parameterize table and grid controls option is not selected, a SetCellData statement is recorded for each value you set in a grid cell.

For a detailed explanation of how to work with the Input statement and how to edit or add data sets to the input data sheet, refer to the SAP Solutions Add-in section of the UFT One Help Center.

Example

Back to top

 

IsCellEditable Method

Description

Checks whether the cell is editable.

Syntax

object.IsCellEditable (Row, Col)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to check.
Row numbers begin with 1.
Col Required. A Variant.
The column of the cell to check. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

PressEnter Method

Description

Presses the ENTER keyboard key when an APO grid control is in focus.

Syntax

object.PressEnter

Return Type

None.

Example

Back to top

 

RowCount Method

Description

Returns the number of rows in the APO grid.

Syntax

object.RowCount

Return Type

A Variant.

Example

Back to top

 

SelectAll Method

Description

Selects all cells in the APO grid.

Syntax

object.SelectAll

Return Type

None.

Example

Back to top

 

SelectCell Method

Description

Selects the specified cell in an APO grid.

Syntax

object.SelectCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to select.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell to select. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

SelectCellMenuItem Method

Description

Right-clicks the specified cell and selects the specified menu item.

Syntax

object.SelectCellMenuItem (Row, Column, MenuItemPath)

Arguments

ParameterDescription
Row Required. A long integer value.

The row number of the cell to select.
Row numbers begin with 1.

Column Required. A String value.
The column of the cell to select. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
MenuItemPath Required. A String value.
The text of the menu item.

Return Type

None.

Example

Back to top

 

SelectColumn Method

Description

Selects the specified column in the APO grid.

Syntax

object.SelectColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to select. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

SelectColumnMenuItem Method

Description

Right-clicks the specified column and selects the specified menu item.

Syntax

object.SelectColumnMenuItem (Column, MenuItemPath)

Arguments

ParameterDescription
Column Required. A String value.
The column to select. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
MenuItemPath Required. A String value.
The text of the menu item.

Return Type

None.

Example

Back to top

 

SelectRow Method

Description

Selects the specified row in the APO grid.

Syntax

object.SelectRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to select.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

SelectRowsRange Method

Description

Selects the specified range of rows in the APO grid.

Syntax

object.SelectRowsRange (StartRow, EndRow)

Arguments

ParameterDescription
StartRow Required. A long integer value.
The number of the first row to select.
Row numbers begin with 1.
EndRow Required. A long integer value.
The number of the last row to select.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

SetCellData Method

Description

Sets the cell contents with the specified data.

Syntax

object.SetCellData (Row, Column, Data)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell for which you want to specify data.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell for which you want to specify data. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
Data Required. A String value.
The data to set for the specified cell.
The possible values for the data depends on the type of cell. For example, the values may be "ON" or "OFF" for a check box or radio button cell, or may be limited to the available values of a combo box.

Return Type

None.

IMPORTANT

This method is recorded only when the Auto-parameterize tables and grids option is not selected in the SAP pane of the Options dialog box.

Example

Back to top

See also: