Returns TRUE if the current object is a Task, FALSE if it is a Test.
[ bTask = ] Object.IsTask
The IsTask property syntax has the following parts:
Name |
Type |
Description |
Object |
ATest |
ATest object |
bTask |
Bool |
A boolean expression that is TRUE if the current object is a Task, FALSE if it is a Test.. |
bTask can be one of the following:
Value |
Description |
True |
The object is a Task. |
False |
The object is a Test. |
This property is only useful when you have an Object variable and want to determine if it is a task or a test.
The following example lists the names of the child tasks/tests under the "PowerSupply" task and identifies each as a task or test:
obTask=Program.Tests("PowerSupply")
print "Task "; obTask.Id; " has "; obTask.TestsCount; " child Tasks/Tests"
for n=1 to obTask.TestsCount
obTest=obTask.Tests(n-1)
if obTest.IsTask
print "Task ";
else
print "Test ";
endif
print obTest.Name
next