It is possible to hook arbitrary Windows applications when running Squish on Windows. In this case "arbitrary" means that the applications don't have to be instrumented by hand, and they don't need to be child applications of already hooked processes either.
This works by editing the configuration file which is read by the code in Squish which handles interactions with native Windows controls (the fallback wrapper as it's called — it kicks in when the particular toolkit wrapper, e.g. Qt, doesn't know what to do with some control).
Open the file "<SQUISH_DIR>/etc/winwrapper.ini" and modify the entry Extra Windows to contain the window title of the respective, other application. For example:
Now you can record tests on applications that use Qt, Java, or some other toolkit, and whenever Squish notices a window that has a caption which matches one of those listed in the Extra Windows setting, it will hook into the window's process so that you can record actions on it (and create verification points, etc).
The Extra Windows setting is a comma-separated list of strings, each being the caption of a window to hook into. Each window caption must be enclosed in double quotes.
|You don't need to specify the exact caption|
The Extra Windows setting understands the * wildcard. This is handy for cases where a window caption can vary (for example, most web browsers and PDF viewers show the page/document name in their caption). For example, instead of...
...which will only work if Acrobat Reader has a particular file open, we can use...
...which will work with Acrobat Reader no matter what document it has open.