IsXMLContent Method

Applies to TestComplete 15.70, last modified on December 17, 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

The IsXMLContent method allows you to know whether the step's content is described as an XML file and XSL file, or as an HTML file.

Declaration

ManualTestingStepInfoObj.IsXMLContent()

ManualTestingStepInfoObj An expression, variable or parameter that specifies a reference to a ManualTestingStepInfo object
Result Boolean

Applies To

The method is applied to the following object:

Result Value

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

Example

The following code snippet determines in what format step instructions are stored. If the instructions are stored in an HTML file, it posts the name of the file to the test log. If the instructions are stored in an XML file, it posts the name of the XML file and the name of the XSL file applied to the XML file to the test log.

JavaScript, JScript

function ManualTestStepInfo()
{

  var ID, Info, XMLFile, XSLFile, HTMLFile;
  // Specifies the test step ID
  ID = "STEP_1";
  // Obtains information on the test step
  Info = ManualTests.NewManualTest.GetStepInfo(ID);

  // Determines the format in which the step instructions are stored
  if (Info.IsXMLContent())
  {
    // Posts the XML file and XSL file names to the test log
    XMLFile = Info.GetInstructionsXML();
    Log.Message("The instructions are stored in the XML file: " + XMLFile);
    XSLFile = Info.GetInstructionsXSL();
    Log.Message("The " + XSLFile + " file is applied to the XML file");
  }
  else
  {
    // Posts the HTML file name to the test log
    HTMLFile = Info.GetInstructionsURL();
    Log.Message("The instructions are stored in the HTML file: " + HTMLFile);
  }

}

Python

def ManualTestStepInfo():
  # Specifies the test step ID
  ID = "STEP_1"
  # Obtains information on the test step
  Info = ManualTests.NewManualTest.GetStepInfo(ID)
  # Determines the format in which the step instructions are stored
  if Info.IsXMLContent():
    # Posts the XML file and XSL file names to the test log
    XMLFile = Info.GetInstructionsXML()
    Log.Message("The instructions are stored in the XML file: " + XMLFile)
    XSLFile = Info.GetInstructionsXSL()
    Log.Message("The " + XSLFile + " file is applied to the XML file")
  else:
    # Posts the HTML file name to the test log
    HTMLFile = Info.GetInstructionsURL()
    Log.Message("The instructions are stored in the HTML file: " + HTMLFile)

VBScript

Sub ManualTestStepInfo

  ' Specifies the test step ID
  ID = "STEP_1"
  ' Obtains information on the test step
  Set Info = ManualTests.NewManualTest.GetStepInfo(ID)

  ' Determines the format in which the step instructions are stored
  If Info.IsXMLContent Then
    ' Posts the XML file and XSL file names to the test log
    XMLFile = Info.GetInstructionsXML
    Log.Message "The instructions are stored in the XML file: " & XMLFile
    XSLFile = Info.GetInstructionsXSL
    Log.Message "The " & XSLFile & " file is applied to the XML file"
  Else
    ' Posts the HTML file name to the test log
    HTMLFile = Info.GetInstructionsURL
    Log.Message "The instructions are stored in the HTML file: " & HTMLFile
  End If

End Sub

DelphiScript

procedure ManualTestStepInfo();
var ID, Info, XMLFile, XSLFile, HTMLFile;
begin

  // Specifies the test step ID
  ID := 'STEP_1';
  // Obtains information on the test step
  Info := ManualTests.NewManualTest.GetStepInfo(ID);

  // Determines the format in which the step instructions are stored
  if Info.IsXMLContent then
  begin
    // Posts the XML file and XSL file names to the test log
    XMLFile := Info.GetInstructionsXML;
    Log.Message('The instructions are stored in the XML file: ' + XMLFile);
    XSLFile := Info.GetInstructionsXSL;
    Log.Message('The ' + XSLFile + ' file is applied to the XML file');
  end
  else
  begin
    // Posts the HTML file name to the test log
    HTMLFile := Info.GetInstructionsURL;
    Log.Message('The instructions are stored in the HTML file: ' + HTMLFile);
  end;

end;

C++Script, C#Script

function ManualTestStepInfo()
{

  var ID, Info, XMLFile, XSLFile, HTMLFile;
  // Specifies the test step ID
  ID = "STEP_1";
  // Obtains information on the test step
  Info = ManualTests["NewManualTest"]["GetStepInfo"](ID);

  // Determines the format in which the step instructions are stored
  if (Info["IsXMLContent"]())
  {
    // Posts the XML file and XSL file names to the test log
    XMLFile = Info["GetInstructionsXML"]();
    Log["Message"]("The instructions are stored in the XML file: " + XMLFile);
    XSLFile = Info["GetInstructionsXSL"]();
    Log["Message"]("The " + XSLFile + " file is applied to the XML file");
  }
  else
  {
    // Posts the HTML file name to the test log
    HTMLFile = Info["GetInstructionsURL"]();
    Log["Message"]("The instructions are stored in the HTML file: " + HTMLFile);
  }

}

See Also

Manual Testing
Executing Manual Tests
About Manual Test Editor
Manual Testing Events
ManualTesting Object

Highlight search results