XSLFileName Property

Applies to TestComplete 15.69, last modified on November 13, 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

Step instructions can be stored in an XML file. Use the XSLFileName property to specify the name of the XSL file that will be applied to this XML file for displaying the instructions of the step that corresponds to 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 XSL file contents will be displayed in the XSL Source page of the Step instructions field in the Manual Test editor. To check the step text format, use the IsXMLContent method.

Declaration

ManualTestStepObj.XSLFileName

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 XSL file that will be applied to the XML file holding 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 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 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
XMLFileName Property
InstructionsURL Property
IsXMLContent Property

Highlight search results