Adding AIR Applications to the List of Tested Applications

Applies to TestComplete 14.80, last modified on April 13, 2021

The information in this topic applies to web tests that locate web objects by using internal identification properties provided by TestComplete and run in local environments.

If you perform the AIR applications testing, you may want to add the tested AIR application to the Tested Applications collection of your project.

Adding AIR Applications From the TestComplete IDE

  1. If your project does not have the Tested Applications collection, add it:

    Add the Tested Apps collection to your project

    Click the image to enlarge it.

  2. Open the Tested Apps collection by double-clicking the TestedApps item in the Project Explorer.

  3. Right-click somewhere in the TestedApps editor and select Add Application from the context menu. This will invoke the Add Tested Application wizard.

  4. On the first page of the wizard, choose Adobe AIR application.

  5. On the next page of the wizard, specify how you are going to run the application. You can run an already installed AIR application just like any other desktop application, or you can run the AIR application without packaging and installing it by using AIR Debug Launcher.

    Note: In order for you to be able to run AIR applications using AIR Debug Launch, the Adobe AIR SDK must be installed on your computer. You can download it from the Adobe web site:

    http://www.adobe.com/go/air_sdk

    To run an installed AIR application:

    • Select the Specify AIR application executable option, and then specify the path to the AIR executable in the text box below. You can enter the path manually or select it with the Open dialog.

    To run an unpackaged AIR application:

    • Select the Run application under AIR debugger option.

    • Specify the path to AIR Debug Launcher’s executable (adl.exe). It usually resides in the bin directory of your AIR SDK installation.
    • Specify the path to the AIR application’s descriptor file (*.xml), which specifies the application metadata.
  6. Click Finish to close the wizard.

TestComplete will add the specified AIR application to the Tested Applications list.

Now, when you record a new test, you can quickly launch your tested AIR application by selecting it from the drop-down list on the Recording toolbar. TestComplete will record the application launch as the Run TestedApp keyword test operation or the TestedApps.AppName.Run scripting method.

Adding AIR Tested Applications From Tests

Instead of manual configuring of TestedApps before running tests, you can add an AIR application to TestedApps from your tests. For this purpose, use the TestedApps.AddAIRApp method:

TestedApps.AddAIRApp()

The method takes no parameters. It returns the index of the new item added to the Tested Applications collection. You can then use the TestedApps.Items(Index) property to get the AIRTestedApp object corresponding to the added AIR application. This object lets you specify launch parameters for the AIR application as well as to run it.

The following sample script demonstrates how you can use the TestedApps.AddAIRApp method.

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

About Tested Applications
Defining Applications to Test
About TestedApps Editor

Highlight search results