Caption Property

Applies to TestComplete 14.72, last modified on April 22, 2021
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 Caption property to specify the caption of the step that corresponds to ManualTestStep. After you save the step to a file and create a project item from this file, this value will be displayed in the Step caption field of the Manual Test editor.

Declaration

ManualTestStepObj.Caption

Read-Write Property String
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

String specifying the step’s caption.

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
Description Property
IconFileName Property
Id Property
Notes Property

Highlight search results