Items Property

Applies to TestComplete 15.47, last modified on January 20, 2023
The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.

Description

The Items property returns a job specified by the index it has in the job collection represented by the Jobs object.

Declaration

JobsObj.Items(Index)

Read-Only Property A Job object
JobsObj An expression, variable or parameter that specifies a reference to a Jobs object
Index [in]    Required    Integer    

Applies To

The property is applied to the following object:

Parameters

The property has the following parameter:

Index

The index of the desired job in the job collection. The index ranges between 0 and Jobs.Count - 1.

Property Value

A Job object.

Remarks

If you use Python or DelphiScript, you should enclose the parameter of the Items property in square brackets: Items[Index].

Since the Items property is the default property for the Jobs object, you can omit the name of this property when referring to a collection item. Thus, the following code lines are equivalent:

JavaScript, JScript

// Using the Items property explicitly
Job = NetworkSuite.Jobs.Items(0);
// Using the Items property implicitly
Job = NetworkSuite.Jobs(0);

Python

# Using the Items property explicitly 
Job = NetworkSuite.Jobs.Items[0]
# Using the Items property implicitly
Job = NetworkSuite.Jobs[0]

VBScript

' Using the Items property explicitly
Set Job = NetworkSuite.Jobs.Items(0)
' Using the Items property implicitly
Set Job = NetworkSuite.Jobs(0)

DelphiScript

// Using the Items property explicitly
Job := NetworkSuite.Jobs.Items[0];
// Using the Items property implicitly
Job := NetworkSuite.Jobs[0];

C++Script, C#Script

// Using the Items property explicitly
Job = NetworkSuite["Jobs"]["Items"](0);
// Using the Items property implicitly
Job = NetworkSuite["Jobs"](0);

Example

To view an example that demonstrates how to use the Items property, see the Job help topic.

See Also

Distributed Testing
Jobs.Count
Jobs.ItemByName
Job Object
Job.Index

Highlight search results