Stores Object

Applies to TestComplete 15.46, last modified on December 01, 2022


Script extensions can be used to create custom checkpoints. At that, you can store the files, images or objects used by these checkpoints in the project’s Stores. However, adding an item to one of the Stores collections is only possible if the project contains the Stores project item and the corresponding collection (Files, Regions or others) exists in Stores. The Stores object lets you check whether the current project contains the needed collection, and, if needed, add the desired collection programmatically.

Note: The Stores object can only be used in the script extension code. It does not exist in TestComplete scripts.



The following example demonstrates how you can make use of the Stores object. It ensures that the current project contains the Stores | Files collection and after that adds the C:\Report.txt file to it.


if (Stores.Exists("Files") || Stores.Create("Files"))
  Files.Add("C:\\Report.txt", "Report");


If Stores.Exists("Files") Or Stores.Create("Files") Then
  Files.Add "C:\Report.txt", "Report"
End If

See Also

Script Extensions
Adding Files to Stores

Highlight search results