ProjectSuite.Variables Property

Applies to TestComplete 14.92, last modified on September 16, 2021

Description

This property returns the collection of local variables that were defined in the current TestComplete project suite. See Project Suite Variables.

Declaration

ProjectSuite.Variables

Read-Only Property A Variables object

Applies To

The property is applied to the following object:

Property Value

A Variables object that represents the collection of local variables defined in the current TestComplete project suite.

Example

The following example demonstrates how to obtain the collection of variables specified in the current project suite and how to modify one of the project suite variables.

JavaScript, JScript

function ProjectSuiteSample()
{
  …

  if (ProjectSuite.Variables.VariableExists("TVar1"))
    ProjectSuite.Variables.TVar1 = "New Value";
  …

}

Python

def ProjectSuiteSample():
  if (ProjectSuite.Variables.VariableExists("TVar1")):
    ProjectSuite.Variables.TVar1 = "New Value"

VBScript

Sub ProjectSuiteSample

  …

  If ProjectSuite.Variables.VariableExists("TVar1") Then
    ProjectSuite.Variables.TVar1 = "New Value"
  End If

  …

End Sub

DelphiScript

procedure ProjectSuiteSample();
begin
  …

  if ProjectSuite.Variables.VariableExists('TVar1') then
    ProjectSuite.Variables.TVar1 := 'New Value';
  …

end;

C++Script, C#Script

function ProjectSuiteSample()
{
  …

  if (ProjectSuite["Variables"]["VariableExists"]("TVar1"))
    ProjectSuite["Variables"]["TVar1"] = "New Value";
  …

}

See Also

Project Suite Variables
Variables Object
Project.Variables

Highlight search results