Description
This property returns the collection of local variables that were defined in the current TestComplete project suite. See Project Suite Variables.
Declaration
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";
…
}
{
…
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
…
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;
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";
…
}
{
…
if (ProjectSuite["Variables"]["VariableExists"]("TVar1"))
ProjectSuite["Variables"]["TVar1"] = "New Value";
…
}