hacksaw
15 years agoNew Contributor
SHBrowseForFolder Win32API call
Hi all,
I'm brand new to TestComplete but am a long time automation coder primarily working with Visual Test. We're looking at moving to TestComplete in my shop and I've got some questions that will help with the evaluation. One area in particular that we need is complete access to the Win32 API.
One of the things we do is put a UI on our automation applications for the SQA engineers to use in order to select which tests will be run, what test assets to use, etc. In this UI we usually have a button that brings up the Win32 BrowseForFolder dialog.using a call to the SHBrowseForFolder API function.
I'm not seeing this function listed in the code completion window. Can anybody give me some example code showing how to invoke the dialog and return the path of the folder selected to a variable?
Thank you.
I'm brand new to TestComplete but am a long time automation coder primarily working with Visual Test. We're looking at moving to TestComplete in my shop and I've got some questions that will help with the evaluation. One area in particular that we need is complete access to the Win32 API.
One of the things we do is put a UI on our automation applications for the SQA engineers to use in order to select which tests will be run, what test assets to use, etc. In this UI we usually have a button that brings up the Win32 BrowseForFolder dialog.using a call to the SHBrowseForFolder API function.
I'm not seeing this function listed in the code completion window. Can anybody give me some example code showing how to invoke the dialog and return the path of the folder selected to a variable?
Thank you.
Hello Clint,
You can create a custom user form (by using TestComplete's User Forms feature) with the TSelectDirectory component to invoke the "Browse for Folder" dialog. Please take a look at the TSelectDirectory Object article on our Support Portal - it contains information about the component along with an example demonstrating how to use it.