Identifier Visible in Semantic View of Android Studio, Not Visible to Appium

  • Platform: Android
  • Appium version: 2.18.0
  • Emulator/Simulator or Real Device: Both
  • Client language (language binding): Kotlin
  • OS: Android 16

Looking for help: I’m seeing an issue with a Text object inside of a Row object not raising its identifier to the XML manifest. I censored out some proprietary information from the screenshot and below code snippet. All of us (the app devs and us automation folks) are stumped, because this id should, logically, be visible to Appium and it previously was visible, so looking for an outside perspective on this to see if someone can spot something we didn’t. The identifier is visible in the Layout Inspector of Android Studio’s attributes viewer, so trying to figure out why Layout Inspector can see it but Appium can’t.

Row(
            modifier =
            modifier
                .testTag($parentTag),
            verticalAlignment = Alignment.CenterVertically,
        ) {
            Text(
                modifier =
                Modifier
                    .width(24.dp)
                    .testTag($childTag),
                textAlign = TextAlign.End,
                text = state.quantity.toString(),
                style = MaterialTheme.typography.titleSmall,
            )

            Icon(
                painterResource(id = R.drawable.ic_triangle_down),
                contentDescription = "",
                tint = Color.Unspecified,
                modifier = Modifier.padding(horizontal = 6.dp),
            )
        }

Did you try enable enableMultiWindows ? Sometimes list in other window shown.

I tried this after your comment and no luck for me there. Based on my understanding, wouldn’t that impact something like, say, alerts, rather than children of a parent object? The Row object and its identifier are visible, for clarity.

Can you explain this? Was it visible in an earlier version of the code? If reverting to an earlier version would expose it, I would take a serious look at the change. Maybe something is wrong or could be improved. Sorry to be vague, not much to go on here.

We actually reverted to the exact code for when we know it was visible (it’s the basis for the example above), which hasn’t worked to resolve it, but we’re unsure if there was (or even could be) another change in the repo that could’ve impacted it. We’ve been assuming that if it’s visible in the attributes presented by Layout Inspector, it should be visible in Appium. I’m not sure if there’s some setting I should be looking at in Layout Inspector that would hint why it’s not.

Edit: @wreed - not sure if you saw my response