IsXMLContent Property

Applies to TestComplete 15.47, last modified on January 20, 2023
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 specify whether the step's content is described as an XML file and XSL file, or as an HTML file.

Declaration

ManualTestStepObj.IsXMLContent

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

True if the step content is stored in the XML+XSL format, False otherwise.

Remarks

If the step contents are stored in the XML+XSL format, the XMLFileName and XSLFileName properties specify the names of the appropriate XML and XSL files.

If the step contents are stored in the HTML format, the InstructionsURL property specify the names of the appropriate HTML file.

Example

The following example demonstrates how to specify the format in which test step instructions are stored.

JavaScript, JScript

function ManualTest()
{

  var RooStep, TestStep1, TestStep2;
  ManualTestBuilder.Reset();
  ManualTestBuilder.Name = "NewManualTest";
  // Obtains the root step of the test and specifies its properties
  RootStep = ManualTestBuilder.Root;

  // Specifies that the test step instructions are not stored in an XML file
  RootStep.IsXMLContent = false;
  // Specifies the instruction text
  RootStep.InstructionsText = "Root step instructions";

  // Adds a new substep to the root step
  // And specifies the HTML file that stores the step instructions
  TestStep1 = RootStep.AddSubstep();
  // Specifies that the test step instructions are not stored in an XML file
  TestStep1.IsXMLContent = false;
  // Specifies the HTML file that stores the instructions
  TestStep1.InstructionsURL = "C:\\Work Folder\\Step1.htm";

  // Adds a new substep to the root step
  // And specifies the XML file that stores the step instructions
  TestStep2 = RootStep.AddSubstep();
  // Specifies that the test step instructions are stored in an XML file
  TestStep2.IsXMLContent = true
  // Specifies the XML file that stores the instructions
  TestStep2.XMLFileName = "C:\\Work Folder\\Step2.xml";
  // Specifies the XSL file to be applied to the XML file
  TestStep2.XSLFileName = "C:\\Work Folder\\XSLFile.xsl";

  // 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
  # Specifies that the test step instructions are not stored in an XML file
  RootStep.IsXMLContent = False 
  # Specifies the instruction text
  RootStep.InstructionsText = "Root step instructions"
  # Adds a new substep to the root step
  # And specifies the HTML file that stores the step instructions
  TestStep1 = RootStep.AddSubstep()
  # Specifies that the test step instructions are not stored in an XML file
  TestStep1.IsXMLContent = False
  # Specifies the HTML file that stores the instructions
  TestStep1.InstructionsURL = "C:\\Work Folder\\Step1.htm"
  # Adds a new substep to the root step
  # And specifies the XML file that stores the step instructions
  TestStep2 = RootStep.AddSubstep()
  # Specifies that the test step instructions are stored in an XML file
  TestStep2.IsXMLContent = True
  # Specifies the XML file that stores the instructions
  TestStep2.XMLFileName = "C:\\Work Folder\\Step2.xml"
  # Specifies the XSL file to be applied to the XML file
  TestStep2.XSLFileName = "C:\\Work Folder\\XSLFile.xsl"
  # 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

  ' Specifies that the test step instructions are not stored in an XML file
  RootStep.IsXMLContent = False
  ' Specifies the instruction text
  RootStep.InstructionsText = "Root step instructions"

  ' Adds a new substep to the root step
  ' And specifies the HTML file that stores the step instructions
  Set TestStep1 = RootStep.AddSubstep
  ' Specifies that the test step instructions are not stored in an XML file
  TestStep1.IsXMLContent = False
  ' Specifies the HTML file that stores the instructions
  TestStep1.InstructionsURL = "C:\Work Folder\Step1.htm"

  ' Adds a new substep to the root step
  ' And specifies the XML file that stores the step instructions
  Set TestStep2 = RootStep.AddSubstep
  ' Specifies that the test step instructions are stored in an XML file
  TestStep2.IsXMLContent = True
  ' Specifies the XML file that stores the instructions
  TestStep2.XMLFileName = "C:\Work Folder\Step2.xml"
  ' Specifies the XSL file to be applied to the XML file
  TestStep2.XSLFileName = "C:\Work Folder\XSLFile.xsl"

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

End Sub

DelphiScript

procedure ManualTest();
var RooStep, TestStep1, TestStep2;
begin

  ManualTestBuilder.Reset;
  ManualTestBuilder.Name := 'NewManualTest';
  // Obtains the root step of the test and specifies its properties
  RootStep := ManualTestBuilder.Root;

  // Specifies that the test step instructions are not stored in an XML file
  RootStep.IsXMLContent := false;
  // Specifies the instruction text
  RootStep.InstructionsText := 'Root step instructions';

  // Adds a new substep to the root step
  // And specifies the HTML file that stores the step instructions
  TestStep1 := RootStep.AddSubstep;
  // Specifies that the test step instructions are not stored in an XML file
  TestStep1.IsXMLContent := false;
  // Specifies the HTML file that stores the instructions
  TestStep1.InstructionsURL := 'C:\Work Folder\Step1.htm';

  // Adds a new substep to the root step
  // And specifies the XML file that stores the step instructions
  TestStep2 := RootStep.AddSubstep;
  // Specifies that the test step instructions are stored in an XML file
  TestStep2.IsXMLContent := true;
  // Specifies the XML file that stores the instructions
  TestStep2.XMLFileName := 'C:\Work Folder\Step2.xml';
  // Specifies the XSL file to be applied to the XML file
  TestStep2.XSLFileName := 'C:\Work Folder\XSLFile.xsl';

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

end;

C++Script, C#Script

function ManualTest()
{

  var RooStep, TestStep1, TestStep2;
  ManualTestBuilder["Reset"]();
  ManualTestBuilder["Name"] = "NewManualTest";
  // Obtains the root step of the test and specifies its properties
  RootStep = ManualTestBuilder["Root"];

  // Specifies that the test step instructions are not stored in an XML file
  RootStep["IsXMLContent"] = false;
  // Specifies the instruction text
  RootStep["InstructionsText"] = "Root step instructions";

  // Adds a new substep to the root step
  // And specifies the HTML file that stores the step instructions
  TestStep1 = RootStep["AddSubstep"]();
  // Specifies that the test step instructions are not stored in an XML file
  TestStep1["IsXMLContent"] = false;
  // Specifies the HTML file that stores the instructions
  TestStep1["InstructionsURL"] = "C:\\Work Folder\\Step1.htm";

  // Adds a new substep to the root step
  // And specifies the XML file that stores the step instructions
  TestStep2 = RootStep["AddSubstep"]();
  // Specifies that the test step instructions are stored in an XML file
  TestStep2["IsXMLContent"] = true
  // Specifies the XML file that stores the instructions
  TestStep2["XMLFileName"] = "C:\\Work Folder\\Step2.xml";
  // Specifies the XSL file to be applied to the XML file
  TestStep2["XSLFileName"] = "C:\\Work Folder\\XSLFile.xsl";

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

}

See Also

Creating Manual Tests From Scripts
InstructionsURL Property
XMLFileName Property
XSLFileName Property

Highlight search results