Active Property

Applies to TestComplete 14.71, last modified on April 22, 2021

Description

The Active property specifies whether the given job is enabled or disabled (the Active property of the job). A job must be enabled in order to run it via the network suite to which it belongs.

Declaration

JobObj.Active

Read-Write Property Boolean
JobObj An expression, variable or parameter that specifies a reference to a Job object

Applies To

The property is applied to the following object:

Property Value

True if the job is enabled, and False otherwise.

Example

For instance, you can check whether the desired job is enabled before running it:

JavaScript, JScript

function Test()
{
  var Job = NetworkSuite.Jobs.ItemByName("Job1");
  if (Job.Active)
    Job.Run(true);
}

Python

def Test():
  Job = NetworkSuite.Jobs.ItemByName["Job1"]
  if Job.Active:
    Job.Run(True)

VBScript

Sub Test
  Set Job = NetworkSuite.Jobs.ItemByName("Job1")
  If Job.Active Then
    Job.Run(True)
  End If
End Sub

DelphiScript

procedure Test;
var Job : OleVariant;
begin
  Job := NetworkSuite.Jobs.ItemByName['Job1'];
  if Job.Active then
    Job.Run(True);
end;

C++Script, C#Script

function Test()
{
  var Job = NetworkSuite["Jobs"]["ItemByName"]("Job1");
  if (Job["Active"])
    Job["Run"](true);
}

See Also

Distributed Testing
Job.Run
Job.Verify
Job.Stop

Highlight search results