Object Model Reference for GUI Testing > Flex > ActivateCell Method

FlexTable Object

Description

A Flex data grid control.

Operations

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

Note: You can also view a list and descriptions of the FlexTable 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 ActivateColumn Clicks the header of the specified column in the table.
ActivateCell Double-clicks the specified cell in the grid.
Common Method CaptureBitmap Saves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method Check Checks whether the actual value of an item matches the expected value.
Common Method CheckProperty Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjects Returns the collection of child objects contained within the object.
Method Click Clicks an object.
Method CollapseRow Collapses a row in the table.
DblClick Double clicks an object.
Method DeselectRow Deselects the specified row in the table.
Method ExpandRow Expands a row in the table.
Method ExtendRow Selects an additional row in the table.
Method GetCellChildObjects Returns the collection of child objects contained within the specified table cell.
Method GetCellData Retrieves the contents of the specified cell from the table.
Method GetColumnName Returns the name of column specified by index.
Common Method GetROProperty Returns the current value of the description properties from the object in the application.
Common Method GetTOProperties Returns the collection of properties and values used to identify the object.
Common Method GetTOProperty Returns the value of the specified description properties from the test object description.
Common Method Output Retrieves the current value of an item and stores it in a specified location.
Common Method RefreshObject Instructs UFT to re-identify the object in the application the next time a step refers to this object.
Method SelectCell Selects the specified cell in the table.
Method SelectRow Selects the specified row in the table.
Method SelectRowsRange Selects the specified range of rows in the table.
Method SetCellData Sets the contents of a cell to the specified text.
Common Method SetTOProperty Sets the value of the specified description properties in the test object description.
Method SortByColumn Sorts an AdvancedDataGrid according to the selected column, in addition to any previous sorting.
Common Method ToString Returns a string that represents the test object.
Common Method WaitProperty Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property Exist Checks whether the object currently exists in the open application.

 

Back to top

ActivateColumn Method

Description

Clicks the header of the specified column in the table.

Syntax

object.ActivateColumn (col)

Arguments

Parameter Description
col Required. A Variant.

The name (with quotes) or index (without quotes) of the column to select. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

Return Type

None.

IMPORTANT

 

Example


Back to top

ActivateCell Method

Description

Double-clicks the specified cell in the grid.

Syntax

object.ActivateCell (row, col, [X] , [Y], [Button])

Arguments

Parameter Description
row Required. A long integer value.

The index of the row where the cell is located.  Index values begin with 0.

col Required. A Variant.
The name (with quotes) or index (without quotes) of the column where the cell is located. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

X

Optional. An integer value.

The X-coordinate of the cell.

Default value: micLeftBtn

Y

Optional. An integer value.

The y-coordinate of the cell.

Default value: micLeftBtn

Button

Optional. A string.

The button used to double-click the specified cell.

Default value = micLeftBtn

Return Type

None

IMPORTANT

This method is supported only for running tests.


 

Back to top

Click Method

Description

Clicks an object.

Syntax

object.Click ([X], [Y], [BUTTON])

Arguments

Parameter Description
X Optional. An integer value.

The x-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object.


Default value = -9999
Y Optional. An integer value.

The y-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object.


Default value = -9999
BUTTON Optional. A predefined constant or number.

The mouse button used to click the object.


Default value = micLeftBtn

Return Type

None.

Example


Back to top

DblClick Method

Description

Double clicks an object.

Syntax

object.Click ([X], [Y], [BUTTON])

Arguments

Parameter Description
X Optional. An integer value.

The x-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object.


Default value = -9999
Y Optional. An integer value.

The y-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. The default value is the center of the object.


Default value = -9999
BUTTON Optional. A predefined constant or number.

The mouse button used to click the object.


Default value = micLeftBtn

Return Type

None.

Example


 

Back to top

CollapseRow Method

Description

Collapses a row in the table.

Syntax

object.CollapseRow (row)

Arguments

Parameter Description
row Required. A long integer value.
The index of the row to collapse. Index values begin with 0.

Return Type

None.

IMPORTANT

This method is relevant only for AdvancedDataGrid controls.

Example


 

Back to top

DeselectRow Method

Description

Deselects the specified row in the table.

Syntax

object.DeselectRow (row)

Arguments

Parameter Description
row Required. A long integer value.
The index of the row to deselect. Index values begin with 0.

Return Type

None.

Example


 

Back to top

ExpandRow Method

Description

Expands a row in the table.

Syntax

object.ExpandRow (row)

Arguments

Parameter Description
row Required. A long integer value.
The index of the row to expand. Index values begin with 0.

Return Type

None.

IMPORTANT

This method is relevant only for AdvancedDataGrid controls.

Example


 

Back to top

ExtendRow Method

Description

Selects an additional row in the table.

Syntax

object.ExtendRow (row)

Arguments

Parameter Description
row Required. A long integer value.
The index of the row to select. Index values begin with 0.

Return Type

None.

IMPORTANT

This method is relevant only for tables that support selecting multiple rows.

Example


 

Back to top

GetCellChildObjects Method

Description

Returns the collection of child objects contained within the specified table cell.

Syntax

object.GetCellChildObjects (row, col, [Description])

Arguments

Parameter Description
row Required. A long integer value.

The index of the row where the cell is located.  Index values begin with 0.

col Required. A Variant.

The name (with quotes) or index (without quotes) of the column where the cell is located. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

Description Optional. An Object.

The Properties (collection) object containing the description of the child objects you want to retrieve.

Tip: You can retrieve a Properties collection using the GetTOProperties method or you can build a Properties collection object using the Description object. For more information on the Description object, refer to the Utility Objects section of the Unified Functional Testing Object Model Reference.

Return Type

An Object.

A collection of test objects. The collection can be empty, or contain one or more objects, depending on the number of relevant child objects found.

IMPORTANT

Example


 

Back to top

GetCellData Method

Description

Retrieves the contents of the specified cell from the table.

Syntax

object.GetCellData (row, col)

Arguments

Parameter Description
row Required. A long integer value.
The index of the row where the cell is located. Index values begin with 0.
col Required. A Variant.
The name (with quotes) or index (without quotes) of the column where the cell is located. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

Return Type

A String value.

Example


 

Back to top

GetColumnName Method

Description

Returns the name of column specified by index.

Syntax

object.GetColumnName (col)

Arguments

Parameter Description
col Required. A long integer value.
The index (without quotes) of the column where the cell is located. Index values begin with 0.

Return Type

A String value.

IMPORTANT

For columns with complex names, for example, if the column header contains an icon, the method returns the column header from the parameter dataField in the DataGridColumn.

Example


 

Back to top

SelectCell Method

Description

Selects the specified cell in the table.

Syntax

object.SelectCell (row, col, [X], [Y])

Arguments

Parameter Description
row Required. A long integer value.
The index of the row where the cell is located. Index values begin with 0.
col Required. A Variant.
The name (with quotes) or index (without quotes) of the column where the cell is located. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

X Optional. An integer value.
The x-coordinate of the location to click when selecting the cell. Note that the specified coordinates are relative to the upper left corner of the cell. The default is the center of the cell.
Default value = -9999
Y Optional. An integer value.
The y-coordinate of the location to click when selecting the cell. Note that the specified coordinates are relative to the upper left corner of the cell. The default is the center of the cell.
Default value = -9999

Return Type

None.

IMPORTANT

Example


 

Back to top

SelectRow Method

Description

Selects the specified row in the table.

Syntax

object.SelectRow (row, [X], [Y])

Arguments

Parameter Description
row Required. A long integer value.
The index of the row to select. Index values begin with 0.
X Optional. A long integer value.
The x-coordinate of the location to click when selecting the row. Note that the specified coordinates are relative to the upper left corner of the row. The default is the center of the row.
Default value = -9999
Y Optional. A long integer value.
The y-coordinate of the location to click when selecting the row. Note that the specified coordinates are relative to the upper left corner of the row. The default is the center of the row.
Default value = -9999

Return Type

None.

IMPORTANT

Example


 

Back to top

SelectRowsRange Method

Description

Selects the specified range of rows in the table.

Syntax

object.SelectRowsRange (FirstRow, LastRow)

Arguments

Parameter Description
FirstRow Required. A long integer value.

The index of the first row in the range of rows to select. Index values begin with 0

LastRow Required. A long integer value.

The index of the last row in the range of rows to select. Index values begin with 0

Return Type

None.

IMPORTANT

This method is relevant only for tables that support selecting multiple rows.

Example


 

Back to top

SetCellData Method

Description

Sets the contents of a cell to the specified text.

Syntax

object.SetCellData (row, col, text)

Arguments

Parameter Description
row Required. A long integer value.

The index of the row where the cell is located.  Index values begin with 0.

col Required. A Variant.
The name (with quotes) or index (without quotes) of the column where the cell is located. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

text Required. A String value.

The contents to be entered into the specified cell.

Return Type

None.

IMPORTANT

When recording operations on columns, UFT records the column name value for the col argument if the column name has a value and that value is unique among the names of the columns in the table.  Otherwise UFT records the column index.

Example


 

Back to top

SortByColumn Method

Description

Sorts an AdvancedDataGrid according to the selected column, in addition to any previous sorting.

Syntax

object.SortByColumn (col)

Arguments

Parameter Description
col Required. A Variant.

The name (with quotes) or index (without quotes) of the column to select. Index values begin with 0.

For columns with complex names, for example, if the column header contains an icon, use the column index. Alternatively, retrieve the column header from the parameter dataField in DataGridColumn, and use that name to specify the column.

Return Type

None.

IMPORTANT

Example


 

Back to top

See also: