IsTask Property (ATask)

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

ATask

ATask 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 child is a Task.

False

The child is a Test.

Comments

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

Example

The following example lists the names of the top level tasks/tests in the current program:

print "Program "; Program.Name; " has "; Program.TestsCount; " top level Tasks/Tests"

for n=1 to Program.TestsCount

obTest=Program.Tests(n-1)

if obTest.IsTask

print "Task ";

else

print "Test ";

endif

print obTest.Name

next

Applies to

ATask

See Also

ATest.IsTask, Tests, TestsCount