# Katalon Studio doesn't spy or record object from windows desktop application

**URL:** <https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915>\
**Category:** Miscellaneous\
**Tags:** windows-action-recor, desktop-spy\
**Created:** [April 10, 2025, 1:32pm UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915 "2025-04-10T13:32:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.gori](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/l.gori/32/30227_2.png) [@l.gori](https://forum.katalon.com/u/l.gori)\
**Post date:** [April 10, 2025, 1:32pm UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915/1 "2025-04-10T13:32:28Z")

</div>

Good morning,  
I am trying to record actions on a Desktop application but the Record function does not detect the objects; the screen is composed by buttons and text but the record (and also the spy) function does not detect anithing in the screen. Only top bar of the application is detected with close/minimize buttons for the window.  
The application, and related objects, is written in QT framework c++ by means of Visual Studio.

I am using Katalon 9.x

On another similar application I also received: org.openqa.selenium.WebDriverException: An unknown error occurred in the remote end while processing the command. (WARNING: The server did not provide any stacktrace information)

Thanks

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [April 11, 2025, 2:58am UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915/2 "2025-04-11T02:58:08Z")

</div>

Hi @l.gori,

Welcome to our community. Have you ever been able to detect it successfully? Can you please help share your code, error log, and steps to reproduce? Thank you

---

<div class="post-metadata">

**Author:** ![l.gori](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/l.gori/32/30227_2.png) [@l.gori](https://forum.katalon.com/u/l.gori)\
**Post date:** [April 15, 2025, 11:27am UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915/3 "2025-04-15T11:27:50Z")

</div>

Good Morning,

I am using katalon version 9.x.

I open Katalon Studio, I access the Record Windows Actions function à Windows recoreder, I edit WinAppDriver URL [http://127.0.0.1:4723/](http://127.0.0.1:4723/) and capabilities ms:waitForAppLaunch value 25.

I put as Application File the path of the .exe and in the Application Title the name of the application window.

I press Start to recordà the application starts, in the View section the application screen is displayed, but only buttons of the application top bar are detected by the recording function; the QML objects composing the application functionalities (written in QT framework) are not detected. I also try to press on Refresh Screen but nothing changes.

I do not receive any errors but not object are detected.

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [May 2, 2025, 9:11am UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915/4 "2025-05-02T09:11:24Z")

</div>

To resolve the issue of Katalon Studio not detecting objects in a QT-based Windows desktop application:

## **1. Verify QT Accessibility Settings**

Ensure the QT application exposes UI elements to accessibility tools:

- **Work with Developers** : Request they add `AccessibleName` or `AutomationId` properties to QT controls in the code:

```auto
// Example for a QPushButton
QPushButton *button = new QPushButton("Submit", this);
button->setAccessibleName("submitButton"); // Mandatory for detection

```

- **Enable QT Automation Support** : The app may need the `QAxContainer` module or compile flags for UI automation.

## **2. Use Inspection Tools**

Confirm if elements are detectable by Windows automation frameworks:

- **Download `inspect.exe`** from the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/).
- Launch the app and use `inspect.exe` to check if elements have **Name** , **AutomationId** , or **ControlType** properties.

## **3. Configure WinAppDriver Properly**

- **Start WinAppDriver Manually** :

```auto
# Run as Administrator
"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"

```

- **Adjust Capabilities** in Katalon:

```auto
"app": "C:\\Path\\To\\YourApp.exe",
"platformName": "Windows",
"deviceName": "WindowsPC",
"ms:waitForAppLaunch": "30" // Increase if app loads slowly

```

## **4. Use XPath or Custom Selectors**

Manually define objects if the recorder fails:

- **Spy Object Manually** :
  1. Open **Object Repository** \> **Add** \> **Windows Object**.
  2. Use `inspect.exe` to find the element’s **RuntimeId** or **AutomationId**.
  3. Define the object using XPath:

```auto
// Example XPath for a button
ObjectRepository.addWindowsObject("SubmitButton", "//Button[@AutomationId='submitButton']")

```

## **5. Modify Katalon Settings**

- **Increase Timeouts** :
  - In `katalon.conf` (under `settings`), add:

```auto
waitForElementTimeout = 60

```

- **Enable Advanced Logging** :
  - In Katalon, go to **Project Settings \> Execution \> Default Executors** and check **Enable advanced logging**.

## **6. Alternative Tools for QT Automation**

If WinAppDriver still fails:

- **Use QT-specific tools** like [Squish](https://www.qt.io/product/qt-quality-assurance) or [Ranorex](https://www.ranorex.com/qt-testing/) to automate the QT app, then integrate results into Katalon via reports.
- **Request a Hybrid Approach** : Use C++ test hooks within the QT app to trigger actions via CLI or APIs.

## **7. Update Katalon & Dependencies**

- **Upgrade to Katalon 10.x** : Newer versions have improved Windows Desktop support.
- **Update WinAppDriver** to the [latest version](https://github.com/microsoft/WinAppDriver/releases).

## **8. Debugging Tips**

- **Check WinAppDriver Logs** :
  - Look for errors in the WinAppDriver console when interacting with the app.

- **Use Accessibility Insights** : Microsoft’s [Accessibility Insights for Windows](https://accessibilityinsights.io/docs/en/windows/overview/) can diagnose accessibility issues.

## **Example Workaround for Undetectable Elements**

If elements still aren’t detected, use **image-based automation** as a last resort:

```auto
// Click using screen coordinates (relative to the window)
Windows.clickImage(findWindowsObject("YourWindow"), "C:\\submit_button.png")

```

## **Final Notes**

- QT apps often require explicit accessibility configurations. Collaboration with developers is key.
- If deadlines are tight, consider using **pywinauto** or **AutoHotkey** scripts for QT automation, then call them from Katalon via `Runtime.getRuntime().exec()`.

---

<div class="post-metadata">

**Author:** ![l.gori](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/l.gori/32/30227_2.png) [@l.gori](https://forum.katalon.com/u/l.gori)\
**Post date:** [May 5, 2025, 8:19am UTC](https://forum.katalon.com/t/katalon-studio-doesnt-spy-or-record-object-from-windows-desktop-application/170915/5 "2025-05-05T08:19:33Z")

</div>

Perfect, thank you, the problem is solved.

It was necessary to set QT accessibility.

I tried with your solution to set `setAccessibleName `but of course it works only for the specific QML element.

I solved assigning the accessibility property to the type (es. graphical) of QML object instead. In this way It worked for all the QML object of that type.

Now all the QML object can be detected.
