Identify for Windows Desktop

This is a short guide that will show you how to find selectors for Windows desktop applications.

Inspect Tool - FlaUIInspect

To identify selectors on Desktop applications, we will use the FlaUInspect application. You can get the tool here: FlaUInspect1.3.0. From here we will refer FlaUIInspect as Inspect.

Before this guide

This guide assumes that you will use our asset application, but the process is the same for any desktop application.

Desktop Application

Setup FlaUIInspect

After opening the Inspect, the application will ask you to choose which UI version you want to use, select the UIA3 Interop which is the one that QualityMate uses.

FlaUInspect Start Window

The Inspect will then load all the UI applications that are active in your computer into a Pane called Desktop and display them as a tree where Desktop is the root.

Finding my Application

To find your application you can navigate through the tree and for any option, you click the Inspect will highlight the element with a red rectangle for a few seconds.

Select application through the Inspect

Also, you can use the Hover mode, which allows you to use the Ctrl key to find applications and controls.

Select hover mode in the Inspect

Element Information

After any of both modes, the information of the element will be displayed on the right side of the Inspect.

Window Details on Inspect

This information is displayed for any element you select and is the one you need to identify or create the selector.

Element Details on Inspect

Creating Selector

You will primarily focus on these 3 properties when creating a selector for desktop applications:

  • AutomationId

  • ClassName

  • ControlType

Code Example

An example to bind elements with the common selectors using our application would be like the following:

using Mobilize.QualityMate.Automation.Entities;
using Mobilize.QualityMate.Automation.Selectors;
using Mobilize.QualityMate.ControlInterfaces;

[Selector("#Form1")] 
public class MyApplication : PageObject
{
    [Selector("[ControlType='Button']")]
    public IButton MyButton { get; set; }
    
    // ...
}

Check the Shared Selector article to know some QualityMate syntax improved.

Element Patterns

An Element Pattern is when an element that we are looking for is not where we expected it to be in the Inspect. This behavior is frequently on Menu elements.

Most of these element patterns have been identified, and in these cases, QualityMate will resolve through their interfaces.

Last updated

Was this helpful?