FindRow Action

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

The FindRow action searches for the specified value within the specified grid column and returns the index of the first row holding that value.

Declaration

TestObj.FindRow(Column, Value)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Column [in]    Required    Variant    
Value [in]    Required    Variant    
Result Integer

Applies To

The method is applied to the following objects:

View Mode

This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Parameters

The method has the following parameters:

Column

Specifies the index or caption of the sought-for column.

The index is zero-based and corresponds to the column’s position within the object's internal columns collection rather than the column’s visible position in the object.

The caption can contain asterisk (*) or question mark (?) wildcards or regular expressions. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. To specify more complicated parts of a caption, use regular expressions.

The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.

Value

Specifies the value to be found in the specified column.

Result Value

The index of the first row that contains the specified value.

Remarks

If the specified value is not found, FindRow returns -1 and posts an informative message to the test log.

Example

To view an example that demonstrates how to use the FindRow action, see:

Highlight search results