Unable to Inspect Jetpack Compose testTag Elements in Katalon Mobile Spy

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:
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:
Text(
    text = "Product Details",
    color = AppColors.colorTextInputError,
    style = MaterialTheme.typography.bodySmall,
    modifier = Modifier.testTag("tvTitle"),
)
  1. Using layoutId with testTag:
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.


:magnifying_glass_tilted_right: 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 :folded_hands:

1 Like

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

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

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

@duyluong can you help

Hello @Elly_Tran , thanks for your quick response! :folded_hands:

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!

1 Like