GetInstructionsURL Method

Applies to TestComplete 14.10, last modified on June 5, 2019
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 GetInstructionsURL method returns the name of the HTML file that holds instructions for the test step.

Note that if the step text is stored in XML+XSL format, the value returned by this method is meaningless. To check the step text format, use the IsXMLContent method.

Declaration

ManualTestingStepInfoObj.GetInstructionsURL()

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

Applies To

The method is applied to the following object:

Result Value

A name of the HTML file with instructions for the manual testing step.

Example

The following code snippet determines in what format step instructions are stored. If the instructions are stored in an HTML file, the code 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 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 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 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 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 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
TestComplete Events
ManualTesting Object

Highlight search results