GetCaption Method

Applies to TestComplete 14.0, last modified on January 23, 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

Use this method to obtain the caption of the manual testing step. This text is shown in the Step caption edit box of the Manual Testing editor.

Declaration

ManualTestingStepInfoObj.GetCaption()

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

The method returns a string that represents the step caption.

Example

The following code snippet obtains information on a manual test step by the step’s ID and posts the step caption to the test log.

JavaScript, JScript

function ManualTestStepInfo()
{
  var ID, Info, Caption;
  // Specifies the test step ID
  ID = "STEP_1";
  // Obtains information on the test step
  Info = ManualTests.NewManualTest.GetStepInfo(ID);
  // Obtains the test step’s caption
  Caption = Info.GetCaption();
  Log.Message(Caption);

  ...

}

Python

def ManualTestStepInfo():
  # Specifies the test step ID
  ID = "STEP_1"
  # Obtains information on the test step
  Info = ManualTests.NewManualTest.GetStepInfo(ID)
  # Obtains the test step's caption
  Caption = Info.GetCaption()
  Log.Message(Caption)

VBScript

Sub ManualTestStepInfo

  ' Specifies the test step ID
  ID = "STEP_1"
  ' Obtains information on the test step
  Set Info = ManualTests.NewManualTest.GetStepInfo(ID)
  ' Obtains the test step’s caption
  Caption = Info.GetCaption
  Log.Message Caption

  ...

End Sub

DelphiScript

procedure ManualTestStepInfo();
var ID, Info, Caption;
begin
  // Specifies the test step ID
  ID := 'STEP_1';
  // Obtains information on the test step
  Info := ManualTests.NewManualTest.GetStepInfo(ID);
  // Obtains the test step’s caption
  Caption := Info.GetCaption;
  Log.Message(Caption);

  ...

end;

C++Script, C#Script

function ManualTestStepInfo()
{
  var ID, Info, Caption;
  // Specifies the test step ID
  ID = "STEP_1";
  // Obtains information on the test step
  Info = ManualTests["NewManualTest"]["GetStepInfo"](ID);
  // Obtains the test step’s caption
  Caption = Info["GetCaption"]();
  Log["Message"](Caption);

  ...

}

See Also

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

Highlight search results