Table Object

Applies to TestComplete 15.68, last modified on October 03, 2024

Description

The Table object provides scripting access to elements of the Stores | Tables collection. Using the object’s properties and methods you can access the stored values and compare the stored data against the controls’ data that displays information in a tabular form (for the list of supported controls, see About Tables Collection).

To obtain the Table object in scripts, use properties of the Tables object.

Requirements

The Table object is available only if your project contains the Stores project item with the Tables collection in it.

Members

Example

The following example demonstrates how to check whether the data of a tabular object has changed.

JavaScript, JScript

function Test()
{

  var Table;
  // Obtains the Table object
  Table = Tables.OrdersTable;
  // Checks whether the data has been changed
  if (Table.Check())
    Log.Message("The data has not been changed")
  else
    Log.Warning("The data has been changed");

}

Python

def Test():
  # Obtains the Table object
  # Checks whether the data has been changed 
  if Tables.OrdersTable.Check():
    Log.Message("The data has not been changed")
  else:
    Log.Warning("The data has been changed")

VBScript

Sub Test

  Dim Table
  ' Obtains the Table object
  Set Table = Tables.OrdersTable
  ' Checks whether the data has been changed
  If Table.Check Then
    Log.Message("The data has not been changed")
  Else
    Log.Warning("The data has been changed")
  End If

End Sub

DelphiScript

procedure Test();
var Table;
begin

  // Obtains the Table object
  Table := Tables.OrdersTable;
  // Checks whether the data has been changed
  if Table.Check then
    Log.Message('The data has not been changed')
  else
    Log.Warning('The data has been changed');

end;

C++Script, C#Script

function Test()
{

  var Table;
  // Obtains the Table object
  Table = Tables["OrdersTable"];
  // Checks whether the data has been changed
  if (Table["Check"]())
    Log["Message"]("The data has not been changed")
  else
    Log["Warning"]("The data has been changed");

}

See Also

Tables Object
About Table Checkpoints

Highlight search results