Regions Object Methods

Applies to TestComplete 15.40, last modified on March 25, 2022

The Regions object contains the following methods:

Method List

Name Description
Add Adds the specified file to the Regions collection and assigns a name to it. Returns True if the file was added successfully; otherwise, it returns False.
AddPicture Adds the specified image to the Regions collection.
Compare Compares an image stored in the Regions collection with another image and returns True or False depending on whether they are identical or not. Also this method lets you update the stored image with the specified one.
Contains Returns True if the Regions collection contains the item with the specified name and False otherwise.
ContainsFile Returns True if the Regions collection contains the file with the specified name and False otherwise.
Count Returns the number of items in the Regions collection.
CreateRegionInfo Creates a new RegionInfo object and returns it.
FileNameByIndex Returns the name of the file stored in the Regions collection as an item with the specified index.
FileNameByName Returns the name of the file stored in the Regions collection as an item with the specified name.
FileNamesList Lists the names of files stored in the Regions collection as a string in which individual file names are separated by line breaks (0x13, 0x10) by default.
Find Returns a rectangular area of one image that is identical to another image (the Find and FindRegion methods are similar but differ in parameter order).
FindRegion Returns a rectangular area of an image that is identical to another image (the FindRegions and Find methods are similar but differ in parameter order).
GetPicture Returns an image stored in the Regions collection as an item with the specified index.
Items Returns the specified item stored in the Regions collection.
LastError Returns text of the last error generated by the object's methods, e.g. "File not found", "Properties are not equal", etc.
NameByFileName Returns the item name under which the specified file is stored in the Regions collection.
NameByIndex Returns the name of the item with the index specified in the Regions collection.
NamesList Lists the names of items stored in the Regions collection as a string in which individual item names are separated by line breaks (0x13, 0x10) by default.
Remove Removes the specified item from the Regions collection. Returns True if the item was deleted successful and False otherwise.

See Also

Regions Object

Highlight search results