TestedAppParams Object

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

Description

The TestedAppParams object provides a scripting interface to parameters of applications defined in your project. It contains properties that let your work with parameters of tested AIR, Java, ClickOnce and Web applications, as well as with parameters of applications run in Simple, RunAs, Debug and Profile run modes.

The object also provides an interface to the parameters of the currently selected mode.

To obtain the TestedAppParams object in your script, use the Params property of the TestedApp object.

Members

Example

The following example demonstrates how to obtain and modify run mode 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:
  ...

  // 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: 
  # ...
  # 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:
  ...

  ' 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:
  ...

  // 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:
  ...

  // 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
About Tested Applications
TestedAppDebugParams Object
TestedAppProfileParams Object
TestedAppRunAsParams Object
TestedAppSimpleParams Object

Highlight search results