IsTask Property (ATest)

Returns TRUE if the current object is a Task, FALSE if it is a Test.

Syntax

[ 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..

Where

bTask can be one of the following:

 

Value

Description

True

The object is a Task.

False

The object is a Test.

Comments

This property is only useful when you have an Object variable and want to determine if it is a task or a test.

Example

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

Applies to

ATest

See Also

ATask.IsTask, Task