Squish supports automating Modern UI/Windows Store (WinRT, UWP) 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.
Using Inspect to check for UI Automation Support of an Application or GUI Control¶
It is possible to check whether an application (or a specific GUI control in an application) exposes/supports UI Automation via the tool
Inspect
from Microsoft (
download
).
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:
Once 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 (WinRT, UWP) 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:
Step 1:
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).
Step 2:
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:
Step 3:
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...
...to...
Step 4:
Write the initial part of the test script yourself, as shown below.
In the test script, we start a normal Windows desktop application to activate the mechanism to hook up applications by their window title. For example "addressbook.exe" in the Squish package:
We would like to use Google Analytics to get a better understanding of how
you use the website.
By agreeing to this, your usage data will be stored in the USA and processed
by Google LLC. Both Google as well as federal US agencies can access this data
and combine it with any other data about you, such as your search history,
personal accounts or any other data known to Google.