|Object checkpoints are deprecated. We do not recommend using them. Use property checkpoints instead.|
Check method is a scripting analog of the Object Checkpoint operation. It verifies the specified object existing in your tested application against the baseline data stored in the project’s Stores | Objects collection.
If the object’s actual property values equal the stored property values, the method returns True. Otherwise, it returns False.
Check method also lets you update the baseline data stored in the Stores | Objects collection during the test run. To do this, enable both the global Update objects option and the Update option of the corresponding object in the collection. In this case, the method updates the baseline data with the property values of the corresponding actual object and its child objects. After that, the
Check method posts a message reporting that the checkpoint data has been updated and returns True.
|StoredObjectObj||An expression, variable or parameter that specifies a reference to a StoredObject object|
|AObject||[in]||Required||A tested object|
The method is applied to the following object:
The method has the following parameter:
The tested object whose properties you want to compare with those of the object stored in the StoredObject element.
In the comparison mode, if the comparison procedure reports that the property values of the actual objects and the baseline property values are equal, the method returns True and ports a checkpoint message () to the test log.
Otherwise, the method returns False and ports an error message () to the test log.
In the update mode, the method always returns True.
By default, if the
Check method cannot find or access the object to be compared, or the object does not match its baseline copy, the method will wait for the object to become accessible and for the comparison to complete successfully for the period the Auto-wait timeout setting specifies. (Go to Tools > Current Project Properties > Playback to view or modify the setting.) If the method fails to access the object, or if the object does not match its baseline copy within this period, the comparison will fail.
The following example executes the object checkpoint MyProcess against the test object of the MyProcess.exe process. The example assumes that the Stores | Objects collection contains the MyProcess item with the checkpoint data.