TestedApps.AddAIRApp Method

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

Description

The TestedApps.AddAIRApp method allows you to dynamically add an AIR tested application to your test project.

Declaration

TestedApps.AddAIRApp()

Result Integer

Applies To

The method is applied to the following object:

Result Value

The zero-based index of the AIR application in the Tested Applications collection. You can use this index to access the corresponding AIRTestedApp object by using the TestedApps.Items(Index) property.

Example

The following script adds an AIR application to the TestedApps collection and launches it.

JavaScript, JScript

function Test()
{
  // Add an AIR application to the project
  var ind = TestedApps.AddAIRApp();
  var app = TestedApps.Items(ind);

  // Specify AIR application's launch parameters
  app.IsExecutable = false;
  app.DebuggerExecutable = "C:\\AIR\\bin\\adl.exe";
  app.DescriptorFileName = "C:\\AIRTestedApp\\Main.xml";

  // Launches the AIR application
  app.Run();
  // Test the application
  // ...

  app.Close();
}

Python

def Test():
  # Add an AIR application to the project
  ind = TestedApps.AddAIRApp;
  app = TestedApps.Items[ind];

  # Specify AIR application's launch parameters
  app.IsExecutable = False;
  app.DebuggerExecutable = "C:\\AIR\\bin\\adl.exe"
  app.DescriptorFileName = "C:\\AIRTestedApp\\Main.xml"

  # Launches the AIR application
  app.Run()
  # Test the application
  # ...

  app.Close()

VBScript

Sub Test
  ' Add an AIR application to the project
  ind = TestedApps.AddAIRApp
  Set app = TestedApps.Items(ind)

  ' Specify AIR application's launch parameters
  app.IsExecutable = False
  app.DebuggerExecutable = "C:\AIR\bin\adl.exe"
  app.DescriptorFileName = "C:\AIRTestedApp\Main.xml"

  ' Launches the AIR application
  app.Run
  ' Test the application
  ' ...

  app.Close
End Sub

DelphiScript

procedure Test();
var ind, app;
begin
  // Add an AIR application to the project
  ind := TestedApps.AddAIRApp;
  app := TestedApps.Items(ind);

  // Specify AIR application's launch parameters
  app.IsExecutable := false;
  app.DebuggerExecutable := 'C:\AIR\bin\adl.exe';
  app.DescriptorFileName := 'C:\AIRTestedApp\Main.xml';

  // Launches the AIR application
  app.Run;
  // Test the application
  // ...

  app.Close;
end;

C++Script, C#Script

function Test()
{
  // Add an AIR application to the project
  var ind = TestedApps["AddAIRApp"]();
  var app = TestedApps["Items"](ind);

  // Specify AIR application's launch parameters
  app["IsExecutable"] = false;
  app["DebuggerExecutable"] = "C:\\AIR\\bin\\adl.exe";
  app["DescriptorFileName"] = "C:\\AIRTestedApp\\Main.xml";

  // Launches the AIR application
  app["Run"]();
  // Test the application
  // ...

  app["Close"]();
}

See Also

Testing AIR Applications
Adding AIR Applications to the List of Tested Applications

Highlight search results