TestedAppParams.SimpleParams

Applies to TestComplete 14.70, last modified on April 22, 2021

Description

A tested application can be run in various modes. Use the SimpleParams property to obtain access to the parameters of the Simple run mode. The TestComplete engine will use these parameters to launch a tested application, if Simple run mode is chosen for this application.

Declaration

TestedAppParamsObj.SimpleParams

Read-Only Property The TestedAppSimpleParams object
TestedAppParamsObj An expression, variable or parameter that specifies a reference to a TestedAppParams object

Applies To

The property is applied to the following object:

Property Value

The TestedAppSimpleParams object that provides a scripting interface to the parameters of the Simple run mode.

Example

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

JavaScript, JScript

function Test()
{

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

  // Modifies the parameters of the Simple run mode
  SimpleParams.CommandLineParameters = "NotOpenApp";
  SimpleParams.WorkFolder = "D:\\Work Folder";
  // Applies the modified parameters and activates the Simple run mode
  SimpleParams.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 Simple run mode
  SimpleParams = Params.SimpleParams
  # Modifies the parameters of the Simple run mode
  SimpleParams.CommandLineParameters = "NotOpenApp"
  SimpleParams.WorkFolder = "D:\\Work Folder"
  # Applies the modified parameters and activates the Simple run mode
  SimpleParams.Activate()
  # Launches the tested application
  TestApp.Run()

VBScript

Sub Test

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

  ' Modifies the parameters of the Simple run mode
  SimpleParams.CommandLineParameters = "NotOpenApp"
  SimpleParams.WorkFolder = "D:\Work Folder"
  ' Applies the modified parameters and activates the Simple run mode
  SimpleParams.Activate
  ' Launches the tested application
  TestApp.Run

End Sub

DelphiScript

procedure Test;
var TestApp, Params, SimpleParams;
begin

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

  // Modifies the parameters of the Simple run mode
  SimpleParams.CommandLineParameters := 'NotOpenApp';
  SimpleParams.WorkFolder := 'D:\Work Folder';
  // Applies the modified parameters and activates the Simple run mode
  SimpleParams.Activate;
  // Launches the tested application
  TestApp.Run;

end;

C++Script, C#Script

function Test()
{

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

  // Modifies the parameters of the Simple run mode
  SimpleParams["CommandLineParameters"] = "NotOpenApp";
  SimpleParams["WorkFolder"] = "D:\\Work Folder";
  // Applies the modified parameters and activates the Simple run mode
  SimpleParams["Activate"]();
  // Launches the tested application
  TestApp["Run"]();

}

See Also

Run Modes and Parameters
Editing Desktop Application Parameters
TestedAppRunAsParams Object
TestedAppParams.ActiveParams
TestedAppParams.DebugParams
TestedAppParams.ProfileParams
TestedAppParams.RunAsParams
About Tested Applications

Highlight search results