TestedAppDebugParams Object

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

A tested application can be run in various modes. TestComplete includes a number of program objects that provide scripting access to parameters specific to the run mode. The TestedAppDebugParams object contains properties specific to the Debug run mode.

To obtain the TestedAppDebugParams object in your script, use the Params.DebugParams sub-property of the corresponding TestedApp object. See Editing Desktop Application Parameters for details.

Members

Example

The following example demonstrates how to modify the tested application’s parameters in script:

JavaScript, JScript

function Test()
{

  var TestApp, Params, DebugParams;
  TestApp = TestedApps.Items("SampleApp");
  // Obtains the tested application's parameters
  Params = TestApp.Params;
  // Obtains the parameters of the Debug run mode
  DebugParams = Params.DebugParams;

  // Modifies the parameters of the Debug run mode:
  // Specifies a command-line argument for the application
  DebugParams.CommandLineParameters = "NotOpenApp";
  // Specifies a working folder for the tested application
  DebugParams.WorkFolder = "D:\\Work Folder";
  // Applies the modified parameters and activates the Debug run mode
  DebugParams.Activate();
  // Launches the tested application
  TestApp.Run();

}

Python

def Test():
  TestApp = TestedApps.Items["SampleApp"]
  # Obtains the tested application's parameters
  Params = TestApp.Params
  # Obtains the parameters of the Debug run mode
  DebugParams = Params.DebugParams
  # Modifies the parameters of the Debug run mode:
  # Specifies a command-line argument for the application
  DebugParams.CommandLineParameters = "NotOpenApp"
  # Specifies a working folder for the tested application
  DebugParams.WorkFolder = "D:\\Work Folder"
  # Applies the modified parameters and activates the Debug run mode
  DebugParams.Activate()
  # Launches the tested application
  TestApp.Run()

VBScript

Sub Test

  Dim TestApp, Params, DebugParams
  Set TestApp = TestedApps.Items("SampleApp")
  ' Obtains the tested application's parameters
  Set Params = TestApp.Params
  ' Obtains the parameters of the Debug run mode
  Set DebugParams = Params.DebugParams

  ' Modifies the parameters of the Debug run mode:
  ' Specifies a command-line argument for the application
  DebugParams.CommandLineParameters = "NotOpenApp"
  ' Specifies a working folder for the tested application
  DebugParams.WorkFolder = "D:\Work Folder"
  ' Applies the modified parameters and activates the Debug run mode
  DebugParams.Activate
  ' Launches the tested application
  TestApp.Run

End Sub

DelphiScript

procedure Test();
var TestApp, Params, DebugParams;
begin

  TestApp := TestedApps.Items('SampleApp');
  // Obtains the tested application's parameters
  Params := TestApp.Params;
  // Obtains the parameters of the Debug run mode
  DebugParams := Params.DebugParams;

  // Modifies the parameters of the Debug run mode:
  // Specifies a command-line argument for the application
  DebugParams.CommandLineParameters := 'NotOpenApp';
  // Specifies a working folder for the tested application
  DebugParams.WorkFolder := 'D:\Work Folder';
  // Applies the modified parameters and activates the Debug run mode
  DebugParams.Activate;
  // Launches the tested application
  TestApp.Run;

end;

C++Script, C#Script

function Test()
{

  var TestApp, Params, DebugParams;
  TestApp = TestedApps.Items("SampleApp");
  // Obtains the tested application's parameters
  Params = TestApp["Params"];
  // Obtains the parameters of the Debug run mode
  DebugParams = Params["DebugParams"];

  // Modifies the parameters of the Debug run mode:
  // Specifies a command-line argument for the application
  DebugParams["CommandLineParameters"] = "NotOpenApp";
  // Specifies a working folder for the tested application
  DebugParams["WorkFolder"] = "D:\\Work Folder";
  // Applies the modified parameters and activates the Debug run mode
  DebugParams["Activate"]();
  // Launches the tested application
  TestApp["Run"]();

}

See Also

Run Modes and Parameters
Editing Desktop Application Parameters
TestedAppParams Object
TestedAppProfileParams Object
TestedAppRunAsParams Object
TestedAppSimpleParams Object
About Tested Applications

Highlight search results