IconFileName Property

Applies to TestComplete 15.42, last modified on September 08, 2022
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 IconFileName property to specify the name of the image file that holds the icon of the step that corresponds to ManualTestStepObj. After you save the step to a file and create a project item from this file, this icon will be displayed to the left of the step description in the Manual Test editor.

Declaration

ManualTestStepObj.IconFileName

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 name of the file that holds the step’s icon.

Remarks

If the property holds an empty string, TestComplete uses the default icon.

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

Highlight search results