Description
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. |
Members
Example
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.
JScript
if (Stores.Exists("Files") || Stores.Create("Files"))
{
Files.Add("C:\\Report.txt", "Report");
}
VBScript
If Stores.Exists("Files") Or Stores.Create("Files") Then
Files.Add "C:\Report.txt", "Report"
End If