Enabled Property

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

The object-driven testing (ODT) functionality is deprecated. Do not use it to create new tests. It will be removed from the product in one of the future releases. As an alternative, you can create custom classes in your scripts. For more information, see Alternatives to the ODT functionality.

Description

The Group.Enabled property specifies if the data group is processed by the Run methods when they walk down the custom object hierarchy. For more information about this, see Controlling Object-Driven Tests.

Declaration

GroupObj.Enabled

Read-Write Property Boolean
GroupObj An expression, variable or parameter that specifies a reference to a Group object

Applies To

The property is applied to the following object:

Property Value

If Enabled is True, the Run methods will process the group when they walk down the object hierarchy. Otherwise they will not process it.

Example

The code below checks whether the MyGroup_Name group is processed by the Run methods when they walk down the object hierarchy.

JavaScript, JScript

function IsGroupEnbaled()
{
  // Obtains information about the group
  var Group = ODT.Data.MyGroup_Name;
  
  // Checks whether the group is processed by the Run methods
  if (Group.Enabled)
    Log.Message("The " + Group.Name + " group is processed by the Run methods")
  else
    Log.Message("The " + Group.Name + " group isn't processed by the Run methods");
}

VBScript

Sub IsGroupEnbaled
  ' Obtains information about the group
  Set Group = ODT.Data.MyGroup_Name
  
  ' Checks whether the group is processed by the Run methods
  If Group.Enabled Then
    Log.Message("The " & Group.Name & " group is processed by the Run methods")
  Else
    Log.Message("The " & Group.Name & " group isn't processed by the Run methods")
  End If
End Sub

DelphiScript

function IsGroupEnbaled;
var Group;
begin
  // Obtains information about the group
  Group := ODT.Data.MyGroup_Name;
  
  // Checks whether the group is processed by the Run methods
  if (Group.Enabled) then
    Log.Message('The ' + Group.Name + ' group is processed by the Run methods')
  else
    Log.Message('The ' + Group.Name + ' group isn''t processed by the Run methods');
end;

C++Script, C#Script

function IsGroupEnbaled()
{
  // Obtains information about the group
  var Group = ODT["Data"]["MyGroup_Name"];
  
  // Checks whether the group is processed by the Run methods
  if ( Group["Enabled"] )
    Log["Message"]( "The " + Group["Name"] + " group is processed by the Run methods" )
  else
    Log["Message"]( "The " + Group["Name"] + " group isn't processed by the Run methods" );
}

See Also

Controlling Object-Driven Tests
Run Method
Run Method

Highlight search results