medha2016
9 years agoNew Contributor
Select a particular file in windows explorer pop up
I am testing an web application. if user clicks on a button (import button : allows user to select file to import), windows explorer pops up for selecting file.
if record this test, i cannot select a different file each time.. as it records the click on co-ordinates.
recorded test converted to script does not allow me to select random files.
alias.browser.dlgopen.DUIViewWndClassName.DirectUIHWND.ctrNotifySink.NamespaceTreeCotrol.sysTreeView32.click(105, 349)
on click i get the window , i dont know how to click on particular file.
I am new to testcomplete.. this is second week.
Hi medha2016,
You can use the OpenFile method to select a file by its path:
// JScript Aliases.browser.dlgopen.OpenFile("C:\\MyFolder\\MyFile.txt");