FlashSettings Object

Applies to TestComplete 15.47, last modified on January 20, 2023
Flash Player has reached end of life on December 31, 2020. Support for Flash and Flex applications is now deprecated in TestComplete and will be removed in a future release.

Description

The FlashSettings object is a helper object that allows you to get access to Flash player options and configure them before testing Flash and Flex applications with the debug version of Flash player. You can also use this object to configure capturing of some extra diagnostic information on Flash player functioning.

To obtain access to the FlashSettings object in scripts, use the FlashSettings property of the Options object.

Members

Example

The code below installs FlashInjector, adds a folder to the list of trusted locations and enables tracing. Then it posts the contents of the Flash Player configuration file and the list of trusted locations to the test log.

JavaScript, JScript

function FlashSettingsExample()
{
  // Add a folder to the list of trusted locations
  Options.FlashSettings.AddTrustedLocation("C:\\WorkFolder");
  
  // Enable tracing
  Options.FlashSettings.FunctionTraceEnabled = true;
  
  // Obtain the contents of the Flash player configuration file
  // and the list of trusted locations
  var ConfigFile = Options.FlashSettings.DebugConfigContents;
  var TrustLoc = Options.FlashSettings.FlashTrustedLocations;
  
  // Post the obtained information to the test log
  Log.Message("The contents of the configuration file: " + ConfigFile);
  Log.Message("The trusted locations are: " + TrustLoc);
}

Python

def FlashSettingsExample():
  # Add a folder to the list of trusted locations
  Options.FlashSettings.AddTrustedLocation("C:\\WorkFolder")
  
  # Enable tracing
  Options.FlashSettings.FunctionTraceEnabled = True
  
  # Obtain the contents of the Flash player configuration file 
  # and the list of trusted locations
  ConfigFile = Options.FlashSettings.DebugConfigContents
  TrustLoc = Options.FlashSettings.FlashTrustedLocations
  
  # Post the obtained information to the test log
  Log.Message("The contents of the configuration file: " + ConfigFile)
  Log.Message("The trusted locations are: " + TrustLoc)

VBScript

Sub FlashSettingsExample()

  ' Add a folder to the list of trusted locations
  Call Options.FlashSettings.AddTrustedLocation("C:\WorkFolder")
  
  ' Enable tracing
  Options.FlashSettings.FunctionTraceEnabled = True
  
  ' Obtain the contents of the Flash player configuration file
  ' and the list of trusted locations
  ConfigFile = Options.FlashSettings.DebugConfigContents
  TrustLoc = Options.FlashSettings.FlashTrustedLocations
  
  ' Post the obtained information to the test log
  Call Log.Message("The contents of the configuration file: " + ConfigFile)
  Call Log.Message("The trusted locations are: " + TrustLoc)
  
End Sub

DelphiScript

function FlashSettingsExample;
var ConfigFile, TrustLoc : OleVariant;
begin
  // Add a folder to the list of trusted locations
  Options.FlashSettings.AddTrustedLocation('C:\WorkFolder');
  
  // Enable tracing
  Options.FlashSettings.FunctionTraceEnabled := true;
  
  // Obtain the contents of the Flash player configuration file
  // and the list of trusted locations
  ConfigFile := Options.FlashSettings.DebugConfigContents;
  TrustLoc := Options.FlashSettings.FlashTrustedLocations;
  
  // Post the obtained information to the test log
  Log.Message('The contents of the configuration file: ' + ConfigFile);
  Log.Message('The trusted locations are: ' + TrustLoc);
end;

C++Script, C#Script

function FlashSettingsExample()
{
  // Add a folder to the list of trusted locations
  Options["FlashSettings"]["AddTrustedLocation"]("C:\\WorkFolder");
  
  // Enable tracing
  Options["FlashSettings"]["FunctionTraceEnabled"] = true;
  
  // Obtain the contents of the Flash player configuration file
  // and the list of trusted locations
  var ConfigFile = Options["FlashSettings"]["DebugConfigContents"];
  var TrustLoc = Options["FlashSettings"]["FlashTrustedLocations"];
  
  // Post the obtained information to the test log
  Log["Message"]("The contents of the configuration file: " + ConfigFile);
  Log["Message"]("The trusted locations are:" + TrustLoc);
}

See Also

Options Object
Project Properties - Flash/Flex Options
Limitations on Testing with the Debug Version of Flash Player
Preparing Flash and Flex Applications for Testing with the Debug Version of Flash Player
Testing Flash and Flex Applications with the Debug Version of Flash Player - Overview

Highlight search results