Object Checkpoint Operation

Applies to TestComplete 15.47, last modified on January 20, 2023
Object checkpoints are deprecated. We do not recommend using them. Use property checkpoints instead.

Description

Use the Object Checkpoint operation to compare one or several properties of an object with values that are stored in the Stores | Objects collection of a TestComplete project. The comparison of a property collection is similar to the comparison of a single property, but it requires more comparison actions. The Object Checkpoint operation simplifies the comparison of several properties. It compares the properties of objects with a baseline copy of property values that are stored in your TestComplete project as an element of the Stores | Objects collection. If the stored and actual property values compare as equal, the operation posts a success message to the test log, otherwise it logs a message summarizing all of the differences found (see below).

Note that you can also use the operation to update the stored data. The functioning mode of the operation is specified by the Update objects setting (you can modify it in the Stores Options dialog) and by the Update attribute of the property collection. By default the operation works in comparison mode. However, if both the setting and attribute are enabled, the operation updates the stored data.

When you are adding the operation to your test, TestComplete displays the Object Checkpoint wizard, where you can specify the object, whose properties will be compared by the operation and the element of the Stores | Objects collection that will be used for the comparison (this element stores the baseline data). For detailed information on working with the wizard, see Object Checkpoint Wizard.

In the Object Checkpoint wizard you can specify whether you will use an existing Objects element, or create a new element. If you choose to use a new element, TestComplete will prompt you to specify the element’s contents, that is, the objects and object properties to store. Note, that you can store data of the selected object only as well as data of that object along with its child objects. You can also customize the set of object properties to store.

Once you finish the wizard, TestComplete will add the new Object Checkpoint operation to your test.

Operation Result

In comparison mode, if the comparison procedure reports that the property collections are identical, the operation returns True and posts a checkpoint message () to the test log. Otherwise, the operation returns False and posts an error message () to the log. In this case, the Details panel contains detailed information on the cause of the operation failure. It contains the names of the properties that differ in the stored and in the current objects, as well as the values of these properties, so you can see why the operation failed.

In update mode the operation always returns True.

Scripting Analogue

The operation is analogue to the StoredObject.Check scripting method.

Child Operations

The operation cannot have child operations.

Operation Parameters

The operation use the following parameter:

AObject

String. The full name of the object, whose properties will be compared with the object stored to the StoredObject element. This object name is shown in the Value column of the Keyword Test editor.

Name

The name of the StoredObject element that belongs to the Stores | Objects collection and that will be used to perform the comparison or update. This element name is shown in the Operation column of the Keyword Test editor.

When adding the operation to the test, you specify the parameters in the Object Checkpoint wizard. After you have added the operation to the test, you can call this wizard to modify the operation parameters by double-clicking the operation in the Keyword Test editor.

To specify AObject parameter, you can also use the Operation Parameters dialog where you can use various types of values to specify the parameters (Constant, Code Expression, Last Operation Result and so on) . To invoke the dialog:

  • Select the operation in the Keyword Test editor.

  • Click the Value cell twice (not a double-click), or select the Value cell and press F2. This will activate the in-place editor.

  • Click the ellipsis button in the in-place editor.

After you specified the desired value in the Operation Parameters dialog, click OK to close the dialog and to apply the changes. To save the changes, press Enter within the in-place editor. Pressing Esc will close the editor and discard any changes.

For more information on assigning values to parameters in the Operation Parameters dialog, see Specifying Operation Parameters.

Remarks

By default, if the Object Checkpoint operation cannot find or access the object the properties of which it verifies, it waits for the object for a period that the Playback > Auto-wait timeout property of your project specifies. If the object has not been found by the end of the period, the operation fails.

For information on object checkpoints, see topics of the About Object Checkpoints section.

See Also

Checkpoints Category
About Object Checkpoints
Object Checkpoint Wizard
Specifying Operation Parameters
Checking Operation Result

Highlight search results