Forum Discussion

vx's avatar
vx
Occasional Contributor
9 years ago
Solved

How to get 'Files' listed in 'Stores' in project explorer

Hello,

 

My requirement is to click on "Browse" button in my application and upload an image. From my understanding to add files/images from our local system, we have to use "Stores|Files" in testcomplete, where we have to first add the images in 'Files' and use it in script. 

But in project explorer, i can see only "Stores", "Files " are not seen listed under it, so i used this way

 

if (Stores.Exists("Files") || Stores.Create("Files"))
{
Files.Add("C:\\Users\\Public\\Pictures\\Sample Pictures\\Desert.jpg", "Desert");
}

 

When i run this, i am getting runtime error saying "Stores is undefined". Please help me resolve this.

 

And welcome any other approaches/suggestions by which we can add files from local system.