I hope someone out there can help me with this seemingly simple issue.
I currently use Excel as a datasource, my scripts read in data from spreadsheets and run data-driven tests. Everything works just great when all tests pass.
However - when tests fail, crash, or are interupted I find that I have several instances of EXCEL left running on my test machine. I currently close these manually through the task manager but I would like a Robot based solution.
I can correctly detect their existence by using ModuleVP, but how to kill them...?
If you know the caption of the excel window, use Win32 APIs to close the windows. e.g, the FindWindow function will identify the window even if it is not visible, provided you give the correct parameters.