MichaelP
15 years agoContributor
How do I loop through a folder of files and click on them to select them?
This is what I can't understand how to do from within the application I'm testing using a loop:
1. Click the AddFiles button to open a standard Windows 'Open' dialog, navigate to the folder containing a number of files (I can do this part)
2. Click on the first file in the folder to select it, close the 'Open' dialog to return to the application under test and do some other operations (I can do this)
3. When the file has been processed, return to step 1 and select the next file for processing (I don't know how to do this in a loop!)
I could do what I want without using a loop just by recording my actions of clicking on files to select them, but I may not know how many files will be in the folder and I want to be sure to go through all of them every time.
I understand aqFileSystem.GetFolderInfo and GetFileInfo and I can create a loop to go through the folder of files and capture name, size etc and write this to a csv file, but I'm at a loss to know how to get it to click on each file as described above.
Any help would be greatly appreciated.
Thank you.
Michael
1. Click the AddFiles button to open a standard Windows 'Open' dialog, navigate to the folder containing a number of files (I can do this part)
2. Click on the first file in the folder to select it, close the 'Open' dialog to return to the application under test and do some other operations (I can do this)
3. When the file has been processed, return to step 1 and select the next file for processing (I don't know how to do this in a loop!)
I could do what I want without using a loop just by recording my actions of clicking on files to select them, but I may not know how many files will be in the folder and I want to be sure to go through all of them every time.
I understand aqFileSystem.GetFolderInfo and GetFileInfo and I can create a loop to go through the folder of files and capture name, size etc and write this to a csv file, but I'm at a loss to know how to get it to click on each file as described above.
Any help would be greatly appreciated.
Thank you.
Michael