Getting information about toolkits and GUI controls (Windows)

Last edited on

Overview

Sometimes it is not obvious which GUI toolkit a program running on Windows has been built with. In such cases it is not clear which Squish edition is appropriate for testing the application.

Using Inspect to get object information via UI Automation

The tool Inspect from Microsoft (download) can be used to check if a GUI supports the UI Automation (the latter used for Coded UI) technologies from Microsoft.

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:

The most interesting properties tend to be ControlType, Name, ClassName, Value.Value}}.

Using AU3_Spy to get information about GUI

The tool AU3_Spy (download) tool (normally provided with www.autoitscript.com and AutoHotkey) can provide some basic information about many GUI controls when hovering over the desired control:

Using UISpy to get information about the GUI

The tool UISpy from Microsoft (download) can query the GUI of running applications for various information.

This information can sometimes be used by froglogic to determine the GUI toolkit used by an application, and thus which Squish edition should be used for testing it.

Let’s take Microsoft’s Notepad application as an example, and in particular, suppose we want to learn more about its Font dialog. The first step is to start the application and open the dialog we are interested in:

Then we start UISpy:

As you can see, it lists the Notepad window as well.

Next we select the entry for Notepad (feel free to expand it, too):

Then we choose to save the selected node (and all its sub-nodes):

Related Information