The object-driven testing (ODT) functionality is deprecated. Do not use it to create new tests. It will be removed from the product in one of the future releases. As an alternative, you can create custom classes in your scripts. For more information, see Alternatives to the ODT functionality.
Description
The Object.IsFiltered
property returns True if TestComplete needs to process the given object when walking down the custom object hierarchy in the manner described in the Controlling Object-Driven Tests topic.
Declaration
ObjectObj.IsFiltered
Read-Only Property | Boolean |
ObjectObj | An expression, variable or parameter that specifies a reference to an Object object |
Applies To
The property is applied to the following object:
Property Value
True if TestComplete needs to process the given object when walking down the custom object hierarchy.
Example
The following code snippet creates an object based on the ODT class, specifies the object properties and checks whether the object will be processed by TestComplete.
JavaScript, JScript
{
ODT.Data.Clear();
ODT.Classes.Clear();
var ClassName = ODT.Classes.Declare("ClassName");
ClassName.AddProperty("Property1", "V1");
ClassName.AddProperty("Property2", "V2");
var MyObject;
// Creates an object based on the ClassName class
MyObject = ODT.Classes.New("ClassName");
// Sets the object properties’ values
MyObject.Properties(0).Value = "Value1";
MyObject.Properties(1).Value = "Value2";
…
// Checks whether TestComplete will process the object
if (MyObject.IsFiltered)
{
// Processes the object
MyObject.Run();
…
}
…
}
VBScript
ODT.Data.Clear
ODT.Classes.Clear
Set ClassName = ODT.Classes.Declare("ClassName")
Call ClassName.AddProperty("Property1", "V1")
Call ClassName.AddProperty("Property2", "V2")
' Creates an object based on the ClassName class
Set MyObject = ODT.Classes.New("ClassName")
' Sets the object properties’ values
MyObject.Properties(0).Value = "Value1"
MyObject.Properties(1).Value = "Value2"
…
' Checks whether TestComplete will process the object
If MyObject.IsFiltered Then
' Processes the object
MyObject.Run
…
End If
…
End Sub
DelphiScript
var ClassName, MyObject;
begin
ODT.Data.Clear();
ODT.Classes.Clear();
ClassName := ODT.Classes.Declare('ClassName');
ClassName.AddProperty('Property1', 'V1');
ClassName.AddProperty('Property2', 'V2');
// Creates an object based on the ClassName class
MyObject := ODT.Classes.New('ClassName');
// Sets the object properties’ values
MyObject.Properties(0).Value := 'Value1';
MyObject.Properties(1).Value := 'Value2';
…
// Checks whether TestComplete will process the object
if MyObject.IsFiltered then
begin
// Processes the object
MyObject.Run;
…
end;
…
end;
C++Script, C#Script
{
ODT["Data"]["Clear"]();
ODT["Classes"]["Clear"]();
var ClassName = ODT["Classes"]["Declare"]("ClassName");
ClassName["AddProperty"]("Property1", "V1");
ClassName["AddProperty"]("Property2", "V2");
var MyObject;
// Creates an object based on the ClassName class
MyObject = ODT["Classes"]["New"]("ClassName");
// Sets the object properties’ values
MyObject["Properties"](0)["Value"] = "Value1";
MyObject["Properties"](1)["Value"] = "Value2";
…
// Checks whether TestComplete will process the object
if (MyObject["IsFiltered"])
{
// Processes the object
MyObject["Run"]();
…
}
…
}