Scheme Property

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

The structure of the log item’s dataset is described by data schemes. Use the Scheme property to obtain the scheme of the dataset represented by the given ProgObj object.

Declaration

ProgObj.Scheme

Read-Only Property A LogDataScheme or LogTableDataScheme object
ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

Property Value

If ProgObj is of the text or picture type, the Scheme property returns the LogDataScheme object, which holds the dataset scheme. Otherwise, if the given dataset is of the table type, this property returns the LogTableDataScheme object, which holds the table scheme.

To determine the dataset type, use the DataType property of the resulting object.

Example

The code below obtains the scheme of the desired test log item's dataset.

JavaScript, JScript

function LogData()
{
  // Obtains a collection of logs
  var LogsCol = Project.Logs;
  // Obtains the first log item
  var LogItem = LogsCol.LogItem(0);
  // Obtains the third dataset
  // of the specified log item
  var LogData = LogItem.Data(2);
  // Obtains the scheme of the dataset
  var Sch = LogData.Scheme;
  // ...
}

Python

def LogData():
  # Obtains a collection of logs
  LogsCol = Project.Logs
  # Obtains the first log item
  LogItem = LogsCol.LogItem[0]
  # Obtains the third dataset
  # of the specified log item
  LogData = LogItem.Data[2]
  # Obtains the scheme of the dataset
  Sch = LogData.Scheme
  # ...

VBScript

Sub LogData()
  ' Obtains a collection of logs
  Set LogsCol = Project.Logs
  ' Obtains the first log item
  Set LogItem = LogsCol.LogItem(0)
  ' Obtains the third dataset
  ' of the specified log item
  Set LogData = LogItem.Data(2)
  ' Obtains the scheme of the dataset
  Set Sch = LogData.Scheme
  ' ...
End Sub

DelphiScript

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

  // Obtains a collection of logs
  LogsCol := Project.Logs;
  // Obtains the first log item
  LogItem := LogsCol.LogItem(0);
  // Obtains the third dataset
  // of the specified log item
  LogData := LogItem.Data(2);
  // Obtains the scheme of the dataset
  Sch := LogData.Scheme;
  // ...

end;

C++Script, C#Script

function LogData()
{
  // Obtains a collection of logs
  var LogsCol = Project["Logs"];
  // Obtains the first log item
  var LogItem = LogsCol["LogItem"](0);
  // Obtains the third dataset
  // of the specified log item
  var LogData = LogItem["Data"](2);
  // Obtains the scheme of the dataset
  var Sch = LogData["Scheme"];
  // ...
}

See Also

Access Test Log Contents from Tests
LogDataScheme Object
LogTableDataScheme Object

Highlight search results