Squish supports automating Modern UI/Windows Store apps when used on the Windows desktop (not the tablet mode).
The support for such apps is based on Squish’ support for Microsoft’s UI Automation API. This means that if the application offers information about its GUI objects via UI Automation it should generally be possible to automate the application with Squish.
Inspect to check for UI Automation Support of an Application or GUI Control¶
Once started (make sure to configure
Inspect via its toolbar as shown in the screenshot of its window further below)
Inspect highlights the currently focused control, as shown here for the German version of the notepad.exe application:
Inspect highlights the desired control one can inspect the information the information that is available for this control via the UI Automation inside of
Inspect itself, on the right hand side:
What matters here is whether
Inspect manages to recognize the individual object (button, tree node, list node, etc.), because if it does, Squish for Windows should generally also be able to recognize that particular object (via its UI Automation extension).
Automating a Modern UI, Windows Store App with Squish¶
Since a Modern UI/Windows Store app is being started “indirectly” (in an isolated area/process called AppContainer) hooking into it must be done via the window title of the app.
To achieve this the following must be done:
Start the app and look up the window title in its title bar or the task bar (by hovering the mouse cursor over its icon).
Open the file
SQUISH_DIR/etc/winwrapper.ini and add the window title from step 1 to this line:
For example for the “Calculator” app supplied with Windows:
Open the file
SQUISH_DIR/etc/winwrapper.ini and add the name of the executable of the app (see Finding the process that a window belongs to):
For example for the “Calculator” app:
Set the priority of the UI Automation extension in Squish to 11 (or higher) in
SQUISH_DIR/lib/extensions/win/uiautomation.ext. To do this change the line…
Write the initial part of the test script yourself, as shown below.
In the test script start a normal Windows desktop application to activate the mechanism that hooks up applications by their window title. For example “notepad.exe”: