Description
Checks whether the installed version of Flash player in the given browser is the debug version.
Declaration
FlashSettingsObj.IsDebugVersion(Browser)
FlashSettingsObj | An expression, variable or parameter that specifies a reference to a FlashSettings object | |||
Browser | [in] | Optional | Variant | Default value: btIExplorer |
Result | Boolean |
Applies To
The method is applied to the following object:
Parameters
The method has the following parameter:
Browser
Specifies the browser to check whether the debug version of the Flash player plugin is installed in it. A browser can be specified via the built-in constant or by the process name ("iexplore", "firefox").
If you want to specify a browser via the constant, you can use the following values:
Constant | Value | Description |
---|---|---|
btIExplorer |
-1 | Microsoft Internet Explorer. |
btFirefox |
-2 | Mozilla Firefox. |
btChrome |
-3 | Google Chrome. |
btEdge |
-6 | Microsoft Edge. |
Result Value
True if the given browser has the debug version of the Flash player plugin installed; 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 Methods
FlashSettings Object
Project Properties - Flash/Flex Options
Testing Flash and Flex Applications with the Debug Version of Flash Player - Overview