Returns a test/task object as specified by the vKey (index or ID) parameter.
[ 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. |
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.
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")