LogTableDataScheme Object

Applies to TestComplete 14.72, last modified on April 22, 2021

Description

The structure of log item data is described by data schemes. The scheme holds the dataset name and describes the type and structure of the stored data. Log data of the table type has a specific scheme represented by the LogTableDataScheme object.

To obtain the LogTableDataScheme object from scripts, use the Scheme property of the LogTableData object which contains the table data.

Members

Example

The code below demonstrates how you can obtain information about the desired log column using the LogTableDataScheme object.

JavaScript, JScript

function LogColumn()
{
  // Obtains a collection of logs
  var LogsCol = Project.Logs;
  // Obtains the first log item
  var LogItem = LogsCol.LogItem(0);
  // Obtains the first dataset
  // of the specified log item
  var LogData = LogItem.Data(0);
  // Obtains the scheme of the dataset
  var Sch = LogData.Scheme;
  // Obtains information about the column
  var Column = Sch.ColumnByName("Column_Name");
  // ...
}

Python

def LogColumn():
  # Obtains a collection of logs
  LogsCol = Project.Logs
  # Obtains the first log item
  LogItem = LogsCol.LogItem[0]
  # Obtains the first dataset
  # of the specified log item
  LogData = LogItem.Data[0]
  # Obtains the scheme of the dataset
  Sch = LogData.Scheme
  # Obtains information about the column
  Column = Sch.ColumnByName["COLUMN_NAME"]
  # ...

VBScript

Sub LogColumn()

  ' Obtains a collection of logs
  Set LogsCol = Project.Logs
  ' Obtains the first log item
  Set LogItem = LogsCol.LogItem(0)
  ' Obtains the first dataset
  ' of the specified log item
  Set LogData = LogItem.Data(0)
  ' Obtains the scheme of the dataset
  Set Sch = LogData.Scheme
  ' Obtains information about the column
  Set Column = Sch.ColumnByName("Column_Name")
  ' ...
 
End Sub

DelphiScript

function LogColumn;
var LogsCol, LogItem, LogData, Sch, Column;
begin

  // Obtains a collection of logs
  LogsCol := Project.Logs;
  // Obtains the first log item
  LogItem := LogsCol.LogItem[0];
  // Obtains the first dataset
  // of the specified log item
  LogData := LogItem.Data[0];
  // Obtains the scheme of the dataset
  Sch := LogData.Scheme;
  // Obtains information about the column
  Column := Sch.ColumnByName('Column_Name');
  // ...

end;

C++Script, C#Script

function LogColumn()
{
  // Obtains a collection of logs
  var LogsCol = Project["Logs"];
  // Obtains the first log item
  var LogItem = LogsCol["LogItem"](0);
  // Obtains the first dataset
  // of the specified log item
  var LogData = LogItem["Data"](0);
  // Obtains the scheme of the dataset
  var Sch = LogData["Scheme"];
  // Obtains information about the column
  var Column = Sch["ColumnByName"]("Column_Name");
  // ...
}

See Also

Access Test Log Contents from Tests
LogDataScheme Object
LogTableData Object

Highlight search results