XMLFileName 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 XMLFileName property to specify the name of the XML file that holds instructions of the step that corresponds to the ManualTestStep. If the step data is stored in the XML+XSL format, then after you save the step to a file and create a project item from this file, the HTML file contents will be displayed in the XML Source page of the Step instructions field in the Manual Test editor. To check the step text format, use the IsXMLContent method.

Declaration

ManualTestStepObj.XMLFileName

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 XML file that holds the step instructions.

Example

The following example demonstrates how to specify the XML file that stores test step instructions and the XSL file that will be applied to that XML file.

JavaScript, JScript

function ManualTest()
{
  ManualTestBuilder.Reset();
  ManualTestBuilder.Name = "NewManualTest";
  // Obtains the root step of the test and specifies its properties
  var RootStep = ManualTestBuilder.Root;
  RootStep.Caption = "Root step of my item";

  // Specifies that the test step instructions are stored in an XML file
  RootStep.IsXMLContent = true;
  // Specifies the XML file that contains the step instructions
  // And the XSL file that will be applied to the XML file
  RootStep.XMLFileName = "C:\\Work Folder\\RootStep.xml";
  RootStep.XSLFileName = "C:\\Work Folder\\XSLFile.xsl";

  // Adds new substeps to the root steps 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 and specifies its properties
  RootStep = ManualTestBuilder.Root
  RootStep.Caption = "Root step of my item"
  # Specifies that the test step instructions are stored in an XML file
  RootStep.IsXMLContent = True
  # Specifies the XML file that contains the step instructions
  # And the XSL file that will be applied to the XML file
  RootStep.XMLFileName = "C:\\Work Folder\\RootStep.xml"
  RootStep.XSLFileName = "C:\\Work Folder\\XSLFile.xsl"
  # Adds new substeps to the root steps 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 and specifies its properties
  Set RootStep = ManualTestBuilder.Root
  RootStep.Caption = "Root step of my item"

  ' Specifies that the test step instructions are stored in an XML file
  RootStep.IsXMLContent = True
  ' Specifies the XML file that contains the step instructions
  ' And the XSL file that will be applied to the XML file
  RootStep.XMLFileName = "C:\Work Folder\RootStep.xml"
  RootStep.XSLFileName = "C:\Work Folder\XSLFile.xsl"

  ' 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 and specifies its properties
  RootStep := ManualTestBuilder.Root;
  RootStep.Caption := 'Root step of my item';

  // Specifies that the test step instructions are stored in an XML file
  RootStep.IsXMLContent := true;
  // Specifies the XML file that contains the step instructions
  // And the XSL file that will be applied to the XML file
  RootStep.XMLFileName := 'C:\Work Folder\RootStep.xml';
  RootStep.XSLFileName := 'C:\Work Folder\XSLFile.xsl';

  // 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 and specifies its properties
  var RootStep = ManualTestBuilder["Root"];
  RootStep["Caption"] = "Root step of my item";

  // Specifies that the test step instructions are stored in an XML file
  RootStep["IsXMLContent"] = true;
  // Specifies the XML file that contains the step instructions
  // And the XSL file that will be applied to the XML file
  RootStep["XMLFileName"] = "C:\\Work Folder\\RootStep.xml";
  RootStep["XSLFileName"] = "C:\\Work Folder\\XSLFile.xsl";

  // 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
XSLFileName Property
InstructionsURL Property
IsXMLContent Property

Highlight search results