11-19-2012, 09:11 AM
Dear ManualTester,
Thank you so much for your codes,
Your code will launch Browse For Folder dialog, wait and capture selecting folder, rite?
It works as you said but my need is automatically select the Tree item on such dialog (the dialog is called by an AUT, not by our script)
On window XP, I simply use this following code to Expand and Select the specified folder:
It is a problem on Win7
QTP can recognize the Tree object (object.exist -> true) but cann't perform anything on it
Thank you so much for your codes,
Your code will launch Browse For Folder dialog, wait and capture selecting folder, rite?
It works as you said but my need is automatically select the Tree item on such dialog (the dialog is called by an AUT, not by our script)
On window XP, I simply use this following code to Expand and Select the specified folder:
Code:
Window("main").Window("dlgAddFolder").Dialog("dlgBrowseForFolder").WinTreeView("treeView").Expand "Desktop;Computer;Local Disk (C: )"
Window("main").Window("dlgAddFolder").Dialog("dlgBrowseForFolder").WinTreeView("treeView").Select"Desktop;Computer;Local Disk (C: )"
It is a problem on Win7
QTP can recognize the Tree object (object.exist -> true) but cann't perform anything on it