Launch Property

Applies to TestComplete 15.69, last modified on November 13, 2024

Description

The Launch property specifies whether the given tested application will be launched by the Run TestedApp keyword test operation or the TestedApps.AppName.Run scripting method. The property value corresponds to the Launch application from tests option specified for the application in the TestedApps editor.

Declaration

TestedAppObj.Launch

Read-Write Property Boolean
TestedAppObj An expression, variable or parameter that specifies a reference to a TestedApp object

Applies To

The property is applied to the following objects:

Property Value

True if the application will be launched and False otherwise.

Remarks

The Launch property is used by methods that launch applications included into the project’s tested applications list. If Launch is False, the methods do not run the application.

Example

The following example demonstrates how to enable the Launch property and run the tested application from within the script.

JavaScript, JScript

function Test()
{

  var SampleApp;
  // Obtains the tested application
  SampleApp = TestedApps.Items("SampleApp");
  // Enables the application Launch property
  SampleApp.Launch = true;
  // Launches the tested application
  SampleApp.Run();

}

Python

def Test():
  # Obtains the tested application
  SampleApp = TestedApps.Items["SampleApp"]
  # Enables the application Launch property
  SampleApp.Launch = True
  # Launches the tested application
  SampleApp.Run()

VBScript

Sub Test

  Dim SampleApp
  ' Obtains the tested application
  Set SampleApp = TestedApps.Items("SampleApp")
  ' Enables the application Launch property
  SampleApp.Launch = True
  ' Launches the tested application
  SampleApp.Run

End Sub

DelphiScript

procedure Test();
var SampleApp;
begin

  // Obtains the tested application
  SampleApp := TestedApps.Items('SampleApp');
  // Enables the application Launch property
  SampleApp.Launch := true;
  // Launches the tested application
  SampleApp.Run;

end;

C++Script, C#Script

function Test()
{

  var SampleApp;
  // Obtains the tested application
  SampleApp = TestedApps["Items"]("SampleApp");
  // Enables the application Launch property
  SampleApp["Launch"] = true;
  // Launches the tested application
  SampleApp["Run"]();

}

See Also

Count Property
Run Method
TestedApps.RunAll
DbgServices.LaunchTestedApplication
DbgServices.LaunchAllTestedApplications

Highlight search results