aqEnvironment.IsPluginInstalled Method

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

Description

The aqEnvironment.IsPluginInstalled method checks whether the plugin specified by its name is installed and enabled in TestComplete and returns the result of the check.

Declaration

aqEnvironment.IsPluginInstalled(PluginName)

PluginName [in]    Required    String    
Result Boolean

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

PluginName

True, if the specified plugin is installed and enabled. False, if the plugin is not installed or if it is disabled in the Extensions dialog.

Result Value

True, if the specified plugin is installed and enabled. False, if the plugin is not installed or if it is disabled in the Extensions dialog.

Remarks

To check whether a certain script extension is installed in TestComplete, use the aqEnvironment.IsScriptExtensionInstalled method.

Example

The code below demonstrates how you can check whether the Keyword Testing plugin is installed before using it.

JavaScript, JScript

function IsPluginInstalledExample()
{
if (aqEnvironment.IsPluginInstalled("Keyword Testing"))
 KeywordTests.Test1.Run()
else
 Log.Error("The \"Keyword Testing\" plugin is not installed.");
}

Python

def IsPluginInstalledExample():
  if aqEnvironment.IsPluginInstalled("Keyword Testing"):
    KeywordTests.Test1.Run()
  else:
    Log.Error("The \"Keyword Testing\" plugin is not installed.")

VBScript

Sub IsPluginInstalledExample
  If aqEnvironment.IsPluginInstalled("Keyword Testing") Then
    KeywordTests.Test1.Run
  Else
    Log.Error "The ""Keyword Testing"" plugin is not installed."
  End If
End Sub

DelphiScript

function IsPluginInstalledExample;
begin
if (aqEnvironment.IsPluginInstalled('Keyword Testing')) then
 KeywordTests.Test1.Run()
else
 Log.Error('The "Keyword Testing" plugin is not installed.');
end;

C++Script, C#Script

function IsPluginInstalledExample()
{
if (aqEnvironment["IsPluginInstalled"]("Keyword Testing"))
 KeywordTests["Test1"]["Run"]()
else
 Log["Error"]("The \"Keyword Testing\" plugin is not installed.");
}

See Also

Installing Extensions
IsScriptExtensionInstalled Method

Highlight search results