Tests Property (AProgram)

Returns a test/task object as specified by the vKey (index or ID) parameter.

Syntax

[ obTask = ] Object.Tests ( vKey)

The Tests property syntax has the following parts:

 

Name

Type

Description

Object

AProgram

AProgram object

vKey

Val Variant

The parameter which specifies the ATest/ATask object. This can be a number (zero based index) or a string (a test or a task ID).

obTask

Object

An ATest/ATask object as specified by the vKey parameter.

Comments

If vkKey specifies a number, the return value is a direct child of this program. If a string is specified, the return object can be any descendent test/task object of this Program.

Use the IsTask property to determine whether the return object is a task or is a test.

Example

The following statements retrieve a direct child Test/Task object of the current program as specified by the vKey parameter:

obTest = Program.Tests(5)

or

obTest = Program.Tests("_5VDCTest")

Applies to

AProgram

See Also

IsTask (ATask), IsTask (ATest), TestsCount