# Unable to Inspect Jetpack Compose testTag Elements in Katalon Mobile Spy

**URL:** <https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 22, 2025, 10:21am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923 "2025-08-22T10:21:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashwini](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ashwini/32/20464_2.png) [@ashwini](https://forum.katalon.com/u/ashwini)\
**Post date:** [August 22, 2025, 10:21am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/1 "2025-08-22T10:21:13Z")

</div>

Hi Team,

We are working on an Android app built with **Jetpack Compose** , and we want to identify elements using `testTag` so that they can be inspected and automated with **Katalon Studio Mobile Spy**.

Our developer has tried the following approaches:

1. **Using semantics with `testTag`:**

```auto
Text(
    text = "Product Details",
    color = AppColors.colorTextInputError,
    style = MaterialTheme.typography.bodySmall,
    modifier = Modifier.semantics {
        testTag = "tvTitle"
        contentDescription = "Product details"
    },
)

```

1. **Using the `testTag` method directly:**

```auto
Text(
    text = "Product Details",
    color = AppColors.colorTextInputError,
    style = MaterialTheme.typography.bodySmall,
    modifier = Modifier.testTag("tvTitle"),
)

```

1. **Using `layoutId` with `testTag`:**

```auto
Text(
    text = "Product Details",
    color = AppColors.colorTextInputError,
    style = MaterialTheme.typography.bodySmall,
    modifier = Modifier.layoutId("tvTitleLayoutId").testTag("tvTitle"),
)

```

However, in all cases, **Katalon Mobile Spy is not able to detect or show these elements with `testTag`**.  
Instead, only generic or parent container nodes are visible, making it very hard to locate elements for automation.

* * *

🔎 **Question:**

- Does Katalon Mobile Spy support inspecting `testTag` attributes from Jetpack Compose?

- If not, is there any workaround (e.g., mapping `testTag` to accessibilityId, contentDescription, or resource-id) so that Katalon can recognize the elements?

- Has anyone successfully integrated Katalon with Jetpack Compose apps for element inspection and test automation?

* * *

Any guidance or workaround would be greatly appreciated 🙏

---

<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:** [August 22, 2025, 10:21am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/2 "2025-08-22T10:21:13Z")

</div>

Hi there, and thanks for posting in the Katalon community! 🤗

To help you faster, please review our guide on Record Mobile Utility here:

- [Spy mobile utility | Katalon Docs](https://docs.katalon.com/katalon-studio/record-and-spy/mobile-record-and-spy-utilities/spy-mobile-utility).
- [https://katalon-inc.my.site.com/katalonhelpcenter/s/article/Why-can-I-not-use-the-Mobile-Spy-Object-Recorder-tool-with-Mobile-applications](https://katalon-inc.my.site.com/katalonhelpcenter/s/article/Why-can-I-not-use-the-Mobile-Spy-Object-Recorder-tool-with-Mobile-applications).

Double-checking the steps and configurations might resolve the issue.

If the doc doesn’t help, feel free to provide more details, and a community member will assist you soon.

Thanks for being a part of our community!  
Best,  
Elly Tran

---

<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:** [August 23, 2025, 10:10am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/3 "2025-08-23T10:10:07Z")

</div>

@duyluong can you help

---

<div class="post-metadata">

**Author:** ![ashwini](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ashwini/32/20464_2.png) [@ashwini](https://forum.katalon.com/u/ashwini)\
**Post date:** [August 25, 2025, 4:18am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/4 "2025-08-25T04:18:05Z")

</div>

Hello @Elly_Tran , thanks for your quick response! 🙏

I went through the documentation you shared and double-checked the configurations, but unfortunately, it didn’t solve my issue.

To clarify again:

- Our app is built with **Jetpack Compose**.

- We are using `testTag` (via `Modifier.testTag()` and also with `semantics`) to uniquely identify elements.

- However, **Katalon Mobile Spy is able to detect other locators like name, xpath, id, claass.**

My questions are:

- Does Katalon Mobile Spy currently support detection of `testTag` attributes in Jetpack Compose?

- If not, is there any workaround (e.g., mapping `testTag` to `contentDescription` or `resource-id`) that works with Katalon?

Would appreciate if someone who has worked with **Jetpack Compose + Katalon Mobile Spy** can share their experience.

Thanks again for the support!

---

<div class="post-metadata">

**Author:** ![depapp](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/depapp/32/29178_2.png) [@depapp](https://forum.katalon.com/u/depapp)\
**Post date:** [October 1, 2026, 3:54am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/5 "2026-10-01T03:54:11Z")

</div>

@ashwini this is not a katalon thing, it is how compose exposes semantics to the accessibility tree. testTag alone is not sent to uiautomator, so appium (and therefore mobile spy) never sees it. you need one extra flag on the root of the screen:

```kotlin
Scaffold(
    modifier = Modifier.semantics { testTagsAsResourceId = true }
) { ... }

```

`testTagsAsResourceId` is in androidx.compose.ui.semantics (it is marked experimental, so your dev adds `@OptIn(ExperimentalComposeUiApi::class)`). once it is set on an ancestor, every testTag below it shows up as `resource-id` in the uiautomator2 page source. in mobile spy you then get `tvTitle` under resource-id and can use `id` or `//*[@resource-id='tvTitle']` as the locator. it only needs to be set once per root composable, not per element.

contentDescription works too and shows up as accessibility id, but it is read out by talkback, so devs usually prefer not to abuse it for test ids. testTagsAsResourceId is the clean route.

---

<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:** [October 31, 2026, 6:42am UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/6 "2026-10-31T06:42:42Z")

</div>

hope your issue is resolved now

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [October 31, 2026, 3:59pm UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/7 "2026-10-31T15:59:45Z")

</div>

I will add couple of points

1. First make sure the change is actually in the build you’re spying on. `testTagsAsResourceId` is only available in newer Compose versions, so if your dev can’t use it, upgrade Compose first. After adding the flag, ship a new build, reinstall the app and refresh the page source in Mobile Spy.

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [October 31, 2026, 4:00pm UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/8 "2026-10-31T16:00:28Z")

</div>

1. As far as I know, dialogs, bottom sheets and popups are separate windows, so the flag on the screen root doesn’t reach them. Set it inside their content too.

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [October 31, 2026, 4:00pm UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/9 "2026-10-31T16:00:48Z")

</div>

1. If a tag sits on a child inside a clickable or merged parent (e.g. a `Text` inside a `Button`), the merged node may only expose the parent’s tag. Put the tag on the parent, or avoid merging for that element.

---

<div class="post-metadata">

**Author:** ![arvind.choudhary](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/arvind.choudhary/32/33165_2.png) [@arvind.choudhary](https://forum.katalon.com/u/arvind.choudhary)\
**Post date:** [October 31, 2026, 4:01pm UTC](https://forum.katalon.com/t/unable-to-inspect-jetpack-compose-testtag-elements-in-katalon-mobile-spy/180923/10 "2026-10-31T16:01:10Z")

</div>

1. To separate app-side issues from Katalon-side ones, dump the screen directly: `adb shell uiautomator dump /sdcard/window.xml`, pull the file and search for your tag in `resource-id`. If it’s there, Mobile Spy will see it too.
