IsInjectorInstalled Property

Applies to TestComplete 15.10, last modified on December 15, 2021
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

Checks whether the FlashInjector module is installed in your system (that is, the mm.cfg file exists and contains a string that specifies the FlashInjector.swf movie to be preloaded).

Declaration

FlashSettingsObj.IsInjectorInstalled

Read-Only Property Boolean
FlashSettingsObj An expression, variable or parameter that specifies a reference to a FlashSettings object

Applies To

The property is applied to the following object:

Property Value

True if the FlashInjector module is correctly installed in your system; False otherwise.

Example

The code below checks whether the debug version of Flash player is installed in Internet Explorer. Then it installs the FlashInjector module (if needed), and posts the path to the Flash player's configuration file and file contents to the test log. Then it uninstalls the FlashInjector module:

JavaScript, JScript

function FlashInjectorInstall()
{
  // Check whether FlashInjector is already configured
  if (!Options.FlashSettings.IsInjectorInstalled)
    // Check whether Internet Explorer has the debug version of Flash player installed
    if (Options.FlashSettings.IsDebugVersion())
    {
      // Install the FlashInjector module
      Options.FlashSettings.InstallInjector();
      Log.Message("FlashInjector is successfully installed");

      // Post the path to the configuration file and its contents to the test log
      Log.Message("The path to the configuration file:" + Options.FlashSettings.DebugConfigPath);
      Log.Message("The configuration file contents:" + Options.FlashSettings.DebugConfigContents);

      // Uninstall the FlashInjector module
      Options.FlashSettings.UninstallInjector();
      Log.Message("FlashInjector is successfully uninstalled");
    }
    else

      Log.Message("Debug version of Flash player is not installed in Internet Explorer");
  else

    Log.Message("FlashInjector is already installed");
}

Python

def FlashInjectorInstall():

  # Check whether FlashInjector is already configured
  if not Options.FlashSettings.IsInjectorInstalled:
    # Check whether Internet Explorer has the debug version of Flash player installed
    if Options.FlashSettings.IsDebugVersion():
      # Install the FlashInjector module
      Options.FlashSettings.InstallInjector()
      Log.Message("FlashInjector is successfully installed")

      # Post the path to the configuration file and its contents to the test log
      Log.Message("The path to the configuration file:" + Options.FlashSettings.DebugConfigPath)
      Log.Message("The configuration file contents:" + Options.FlashSettings.DebugConfigContents)

      # Uninstall the FlashInjector module
      Options.FlashSettings.UninstallInjector()
      Log.Message("FlashInjector is successfully uninstalled")
    else:
      Log.Message("Debug version of Flash player is not installed in Internet Explorer")
  else:
    Log.Message("FlashInjector is already installed")

VBScript

Sub FlashInjectorInstall()

  ' Check whether FlashInjector is already configured
  If (Not Options.FlashSettings.IsInjectorInstalled) Then

    ' Check whether Internet Explorer has the debug version of Flash player installed
    If (Options.FlashSettings.IsDebugVersion) Then 
  
      ' Install the FlashInjector module
      Call Options.FlashSettings.InstallInjector()
      Log.Message "FlashInjector is successfully installed"

      ' Post the path to the configuration file and its contents to the test log
      Log.Message "The path to the configuration file:" + Options.FlashSettings.DebugConfigPath
      Log.Message "The configuration file contents:" + Options.FlashSettings.DebugConfigContents

      ' Uninstall the FlashInjector module
      Call Options.FlashSettings.UninstallInjector()
      Log.Message "FlashInjector is successfully uninstalled"

    Else
      Log.Message "Debug version of Flash player is not installed in Internet Explorer"
    End If 

  Else
    Log.Message "FlashInjector is already installed"
  End If

End Sub

DelphiScript

procedure FlashInjectorInstall();
begin

  // Check whether FlashInjector is already configured
  if (not Options.FlashSettings.IsInjectorInstalled) then
    // Check whether Internet Explorer has the debug version of Flash player installed
    if (Options.FlashSettings.IsDebugVersion()) then
    begin
      // Install the FlashInjector module
      Options.FlashSettings.InstallInjector();
      Log.Message('FlashInjector is successfully installed');

      // Post the path to the configuration file and its contents to the test log
      Log.Message('The path to the configuration file:' + Options.FlashSettings.DebugConfigPath);
      Log.Message('The configuration file contents:' + Options.FlashSettings.DebugConfigContents);

      // Uninstall the FlashInjector module
      Options.FlashSettings.UninstallInjector();
      Log.Message('FlashInjector is successfully uninstalled');
    end
    else
      Log.Message('Debug version of Flash player is not installed in Internet Explorer')
  else
    Log.Message('FlashInjector is already installed')
end;

C++Script, C#Script

function FlashInjectorInstall()
{
  // Check whether FlashInjector is already configured
  if (!Options["FlashSettings"]["IsInjectorInstalled"])

    // Check whether Internet Explorer has the debug version of Flash player installed
    if (Options["FlashSettings"]["IsDebugVersion"]())
    {
      // Install the FlashInjector module
      Options["FlashSettings"]["InstallInjector"]();
      Log["Message"]("FlashInjector is successfully installed");

      // Post the path to the configuration file and its contents to the test log
      Log["Message"]("The path to the configuration file:" + Options["FlashSettings"]["DebugConfigPath"]);
      Log["Message"]("The configuration file contents:" + Options["FlashSettings"]["DebugConfigContents"]);

      // Uninstall the FlashInjector module
      Options["FlashSettings"]["UninstallInjector"]()
      Log["Message"]("FlashInjector is successfully uninstalled");
    }

    else
      Log["Message"]("Debug version of Flash player is not installed in Internet Explorer");
  else
    Log["Message"]("FlashInjector is already installed");
}

See Also

FlashSettings Object Properties
FlashSettings Object
Project Properties - Flash/Flex Options
Testing Flash and Flex Applications with the Debug Version of Flash Player - Overview

Highlight search results