ManualTestBuilder.Root Property

Applies to TestComplete 15.63, last modified on April 23, 2024
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 this property to work with the root step of the manual test that you are creating with the ManualTestBuilder object.

Declaration

ManualTestBuilder.Root

Read-Only Property A ManualTestStep object

Applies To

The property is applied to the following object:

Property Value

A ManualTestStep object that provides scripting access to the test’s root step.

Example

The following code snippet demonstrates how to create a new manual test, specify its name, add steps to it and save the test to a file.

JavaScript, JScript

function CreateManualTest()
{
  // Clears the test properties
  ManualTestBuilder.Reset();

  // Specifies the test name
  ManualTestBuilder.Name = "NewManualTest";

  // Creates the root step of the test
  var RootStep = ManualTestBuilder.Root;
  // Specifies the root step properties
  RootStep.ID = "RootStep";
  RootStep.Caption = "Manual Test";
  RootStep.IsXMLContent = false;
  RootStep.InstructionsText = "Click Begin Test";

  ...

  // Adds new substeps and specifies their properties
  var TestStep = RootStep.AddSubstep();
  TestStep.Id = "STEP_1";
  TestStep.Caption = "Step 1";
  TestStep.Enabled = true;
  TestStep.IsXMLContent = false;
  TestStep.InstructionsURL = "C:\\Work Folder\\Manual Tests\\Step1.htm";

  ...

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

}

Python

def CreateManualTest():
  # Clears the test properties
  ManualTestBuilder.Reset()
  # Specifies the test name
  ManualTestBuilder.Name = "NewManualTest"
  # Creates the root step of the test
  RootStep = ManualTestBuilder.Root
  # Specifies the root step properties
  RootStep.ID = "RootStep"
  RootStep.Caption = "Manual Test"
  RootStep.IsXMLContent = False
  RootStep.InstructionsText = "Click Begin Test"
  # Adds new substeps and specifies their properties
  TestStep = RootStep.AddSubstep()
  TestStep.Id = "STEP_1"
  TestStep.Caption = "Step 1"
  TestStep.Enabled = True
  TestStep.IsXMLContent = False
  TestStep.InstructionsURL = "C:\\Work Folder\\Manual Tests\\Step1.htm"
  # Saves the created test to a file
  ManualTestBuilder.Save("C:\\Work Folder\\Manual Tests", True)

VBScript

Sub CreateManualTest

  ' Clears the test properties
  ManualTestBuilder.Reset

  ' Specifies the test name
  ManualTestBuilder.Name = "NewManualTest"

  ' Creates the root step of the test
  Set RootStep = ManualTestBuilder.Root
  ' Specifies the root step properties
  RootStep.ID = "RootStep"
  RootStep.Caption = "Manual Test"
  RootStep.IsXMLContent = False
  RootStep.InstructionsText = "Click Begin Test"

  ...

  ' Adds new substeps and specifies their properties
  Set TestStep = RootStep.AddSubstep
  TestStep.Id = "STEP_1"
  TestStep.Caption = "Step 1"
  TestStep.Enabled = True
  TestStep.IsXMLContent = False
  TestStep.InstructionsURL = "C:\Work Folder\Manual Tests\Step1.htm"

  ...

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

End Sub

DelphiScript

procedure CreateManualTest();
var RootStep, TestStep;
begin
  // Clears the test properties
  ManualTestBuilder.Reset;

  // Specifies the test name
  ManualTestBuilder.Name := 'NewManualTest';

  // Creates the root step of the test
  RootStep := ManualTestBuilder.Root;
  // Specifies the root step properties
  RootStep.ID := 'RootStep';
  RootStep.Caption := 'Manual Test';
  RootStep.IsXMLContent := false;
  RootStep.InstructionsText := 'Click Begin Test';

  ...

  // Adds new substeps and specifies their properties
  TestStep := RootStep.AddSubstep;
  TestStep.Id := 'STEP_1';
  TestStep.Caption := 'Step 1';
  TestStep.Enabled := true;
  TestStep.IsXMLContent := false;
  TestStep.InstructionsURL := 'C:\Work Folder\Manual Tests\Step1.htm';

  ...

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

end;

C++Script, C#Script

function CreateManualTest()
{
  // Clears the test properties
  ManualTestBuilder["Reset"]();

  // Specifies the test name
  ManualTestBuilder["Name"] = "NewManualTest";

  // Creates the root step of the test
  var RootStep = ManualTestBuilder["Root"];
  // Specifies the root step properties
  RootStep["ID"] = "RootStep";
  RootStep["Caption"] = "Manual Test";
  RootStep["IsXMLContent"] = false;
  RootStep["InstructionsText"] = "Click Begin Test";

  ...

  // Adds new substeps and specifies their properties
  var TestStep = RootStep["AddSubstep"]();
  TestStep["Id"] = "STEP_1";
  TestStep["Caption"] = "Step 1";
  TestStep["Enabled"] = true;
  TestStep["IsXMLContent"] = false;
  TestStep["InstructionsURL"] = "C:\\Work Folder\\Manual Tests\\Step1.htm";

  ...

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

}

See Also

Creating Manual Tests From Scripts
ManualTestStep Object

Highlight search results