How to use Inspect.exe and Locator Types with Native Apps

How to use Inspect.exe and Locator Types with Native Apps

To use Cycle native app steps, it is recommended that Window’s Inspect.exe is used to identify app Object Identifiers.  It is recommended to use Inspect.exe with multiple monitors. If you have not downloaded and installed Inspect.exe, follow the instructions provided in this article: 

How to Configure Your Computer to Use Cycle's Native App Steps

When using native app steps there are 4 element locator types that can be used to interact with applications using Cycle.

Locator Types:

  • Name
  • AutomationId
  • xPath
  • controlType

Finding Object Identifiers with Inspect.exe can be done in two ways. 

1) With your application and Inspect.exe open, the mouse cursor can be moved around the application and Inspect.exe will show UI element information in real time based on what UI element the cursor is hovering over.

In the example below using Windows calculator app, the “1” button is being hovered over, and the Tree view and Data view displays information about the “1” button.  The Tree view shows the location of the button within the element hierarchy, and the Data view shows Object Identifiers of the button.

  mceclip0.pngmceclip1.png

 2) With your application and Inspect.exe open, the Tree view on the left side can be navigated to any accessible element within the element hierarchy with mouse or keyboard.

Both a Locator Type and an Object Identifier are needed in order to write Cycle steps.  

For most use cases the Name or AutomationId object types will be the most reliable and help maintain the readability of features.  Using xPath and controlType may take more time to execute and could be less reliable.

Note: If an application is closed and reopened, Inspect.exe may also need to be closed and reopened in order for accurate information to be displayed.

Inspect.exe has a wide range of additional settings and features, the official Microsoft documentation on Inspect.exe can be found here:

https://docs.microsoft.com/en-us/windows/desktop/winauto/inspect-objects


    • Related Articles

    • How to Use xPath With Native App Steps

      Native app steps and xPath Cycle native app steps (using WinAppDriver) allow for the use of several object locator types to identify objects within the app. Whenever possible, it is best to identify application objects using the WinAppDriver ...
    • How To Decide When to Use Native App Steps

      Beginning with Cycle 2.4, Cycle now has the ability to interact with native Windows applications by using the WinAppDriver (WAD). These new native app steps allow Cycle to interact with Windows applications without relying on desktop steps that are ...
    • How To Use WinAppDriver UI Recorder to Record xPath

      Why You Might Use WinAppDriver (WAD) UIRecorder Cycle native app steps using WinAppDriver allow for the use of several object locator types to identify objects within the app. Whenever possible, it is best to identify application objects using the ...
    • How To Configure Your Computer to use Cycle's Native App Steps

      Beginning with version 2.4, Cycle adds a new set of steps designed for interacting with native applications on your computer in specifically targeted ways. In order to use these steps, you will need to take the following steps on your machine: Step ...
    • How To Find Windows AppID for Native App Steps (unable to create new remote session)

      Windows applications built using the Universal Windows Platform (UWP) API require Cycle to open the application using the AppID of the application rather than than specifying the executable application as needed when opening Classic Windows (Win32) ...