Michael Katkov
Michael Katkov

Reputation: 2356

Appium doesn't see XML layout inside Jetpack Compose Android

I have this content of the BottomSheet with AndroidView inside, where I use AndroidView to inject RecyclerView inside Jetpack Compose layout:

Box(
 modifier = Modifier.automationTag("BottomSheet")
) {
 AndroidView(
  factory = { contentView },
 )
 MainHeaderComponent()
}

MainHeaderComponent looks like this:

@Composable
fun MainHeaderComponent() {
 Row {
  Button(
   modifier = Modifier.automationTag("HeaderRegisterButton"),
  )
  Button(
   modifier = Modifier.automationTag("HeaderLoginButton"),
  )
 }
}

In the Appium Inspector, I see this layout: enter image description here

The RecyclerView that I inject into the AndroidView is completely missing in the Appium Hierarchy. Is it a way in Android to help Appium recognise xml view hierarchy inside jetpack composable layout? Thank you for your help.

Upvotes: 0

Views: 64

Answers (0)

Related Questions