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.
Files is an object you need to manually add to the Stores node. Right click on Stores, select Add -> New Item and select "Files". You can then use the "Files" object (there's no such thing as the "Stores" object) to add, remove, compare files within your test code.