Preparing HTML-Based AIR Applications for Testing

Applies to TestComplete 15.45, last modified on December 01, 2022

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.

TestComplete provides you with extended abilities to create flexible tests for HTML-based AIR applications. In order to test your HTML-based AIR applications, you do not have to change your code in any way, but you need to prepare your application in a special way.

To enable TestComplete to recognize objects of an HTML-based AIR application, you need to include the <TestComplete>\Open Apps\Flex\AIRAgent.js file in the application. To do this, open the HTML page that is used as the basis for your AIR application for editing and import the AIRAgent.js file to the <head> section.

HTML

<head>
  <title>HTML AIR Sample Application</title>
  <script src="AIRAliases.js" type="text/javascript"></script>
  <script src="AIRAgent.js" type="text/javascript"></script>
</head>

If you do not include the AIRAgent.js file in your HTML-based AIR application, the TestComplete test engine cannot access the application’s internals.

When you are recording a test and trying to perform an action with an HTML-based AIR application that was not properly prepared for testing with TestComplete, the latter displays a balloon that warns you about that. To control whether the warning should be displayed, you can use the Show the "Application was not prepared properly" message option.

See Also

Testing AIR Applications - Overview
Preparing Flex-Based AIR Applications for Testing

Highlight search results