Enabled Property

Applies to TestComplete 15.47, last modified on January 20, 2023
The manual testing functionality is deprecated. Do not use it for creating new tests. It will be removed in a future TestComplete release.

Description

Use the Enabled property to specify whether TestComplete should execute the step, that corresponds to ManualTestStep.

Declaration

ManualTestStepObj.Enabled

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

Applies To

The property is applied to the following object:

Property Value

True, if the step should be executed and False otherwise.

Example

The following example demonstrates how to obtain the ManualTestStep object and specify its properties:

JavaScript, JScript

function ManualTest()
{
  ManualTestBuilder.Reset();
  ManualTestBuilder.Name = "NewManualTest";
  // Obtains the root step of the test
  var RootStep = ManualTestBuilder.Root;

  // Specifies the step caption
  RootStep.Caption = "Root step of my item";

  // Specifies the step ID
  RootStep.Id = "RootStep";

  // Enables the root step
  RootStep.Enabled = true;

  // Specifies the test step description
  RootStep.Description = "Root step of the manual test";

  // Specifies the icon corresponding to the test
  RootStep.IconFileName = "C:\Work Folder\icon.bmp";

  // Specifies the test step notes
  RootStep.Notes = "Root step note";

  // Specifies the format of the file storing step instructions
  RootStep.IsXMLContent = false;
  // Specifies the step instructions
  RootStep.InstructionsText = "Test step instructions";

  // Adds new substeps to the root step and specifies their properties
  ...

  // Saves the created test to a file
  ManualTestBuilder.Save("C:\\Work Folder\\ManualTest\\", true);

}

Python

def ManualTest():
  ManualTestBuilder.Reset()
  ManualTestBuilder.Name = "NewManualTest"
  # Obtains the root step of the test
  RootStep = ManualTestBuilder.Root
  # Specifies the step caption
  RootStep.Caption = "Root step of my item"
  # Specifies the step ID
  RootStep.Id = "RootStep"
  # Enables the root step
  RootStep.Enabled = True
  # Specifies the test step description
  RootStep.Description = "Root step of the manual test"
  # Specifies the icon corresponding to the test
  RootStep.IconFileName = "C:\Work Folder\icon.bmp"
  # Specifies the test step notes
  RootStep.Notes = "Root step note"
  # Specifies the format of the file storing step instructions
  RootStep.IsXMLContent = False
  # Specifies the step instructions
  RootStep.InstructionsText = "Test step instructions"
  # Adds new substeps to the root step and specifies their properties
  # ...
  # Saves the created test to a file
  ManualTestBuilder.Save("C:\\Work Folder\\ManualTest\\", True)

VBScript

Sub ManualTest

  ManualTestBuilder.Reset
  ManualTestBuilder.Name = "NewManualTest"
  ' Obtains the root step of the test
  Set RootStep = ManualTestBuilder.Root

  ' Specifies the step caption
  RootStep.Caption = "Root step of my item"

  ' Specifies the step ID
  RootStep.Id = "RootStep"

  ' Enables the root step
  RootStep.Enabled = True

  ' Specifies the test step description
  RootStep.Description = "Root step of the manual test"

  ' Specifies the icon corresponding to the test
  RootStep.IconFileName = "C:\Work Folder\icon.bmp"

  ' Specifies the test step notes
  RootStep.Notes = "Root step note"

  ' Specifies the format of the file storing step instructions
  RootStep.IsXMLContent = False
  ' Specifies the step instructions
  RootStep.InstructionsText = "Test step instructions"

  ' Adds new substeps to the root step and specifies their properties
  ...

  ' Saves the created test to a file
  Call ManualTestBuilder.Save("C:\Work Folder\ManualTest\", True)

End Sub

DelphiScript

procedure ManualTest();
var RootStep;
begin
  ManualTestBuilder.Reset;
  ManualTestBuilder.Name := 'NewManualTest';
  // Obtains the root step of the test
  RootStep := ManualTestBuilder.Root;

  // Specifies the step caption
  RootStep.Caption := 'Root step of my item';

  // Specifies the step ID
  RootStep.Id := 'RootStep';

  // Enables the root step
  RootStep.Enabled := true;

  // Specifies the test step description
  RootStep.Description := 'Root step of the manual test';

  // Specifies the icon corresponding to the test
  RootStep.IconFileName := 'C:\Work Folder\icon.bmp';

  // Specifies the test step notes
  RootStep.Notes := 'Root step note';

  // Specifies the format of the file storing step instructions
  RootStep.IsXMLContent := false;
  // Specifies the step instructions
  RootStep.InstructionsText := 'Test step instructions';

  // Adds new substeps to the root step and specifies their properties
  ...

  // Saves the created test to a file
  ManualTestBuilder.Save('C:\Work Folder\ManualTest\', true);

end;

C++Script, C#Script

function ManualTest()
{
  ManualTestBuilder["Reset"]();
  ManualTestBuilder["Name"] = "NewManualTest";
  // Obtains the root step of the test
  var RootStep = ManualTestBuilder["Root"];

  // Specifies the step caption
  RootStep["Caption"] = "Root step of my item";

  // Specifies the step ID
  RootStep["Id"] = "RootStep";

  // Enables the root step
  RootStep["Enabled"] = true;

  // Specifies the test step description
  RootStep["Description"] = "Root step of the manual test";

  // Specifies the icon corresponding to the test
  RootStep["IconFileName"] = "C:\Work Folder\icon.bmp";

  // Specifies the test step notes
  RootStep["Notes"] = "Root step note";

  // Specifies the format of the file storing step instructions
  RootStep["IsXMLContent"] = false;
  // Specifies the step instructions
  RootStep["InstructionsText"] = "Test step instructions";

  // Adds new substeps to the root step and specifies their properties
  ...

  // Saves the created test to a file
  ManualTestBuilder["Save"]("C:\\Work Folder\\ManualTest\\", true);

}

See Also

Creating Manual Tests From Scripts

Highlight search results