Skip to content

Add API to get children from specific node #27

Description

@AJIEKCX

I want to get all items from Row or Column and cast them to specific PageObject. But now you can use only the Compose testing API to get all semantic nodes:

private val semanticItems = semanticsProvider
  .onAllNodes(hasTestTag(TestTag.MoneyItem.Title), useUnmergedTree = true)
   .fetchSemanticsNodes()

val items: List<KDashboardMoneyItemNode> = semanticItems.mapIndexed { index, _ ->
   child {
       useUnmergedTree = true
       hasTestTag(TestTag.MoneyItem.Tag)
       hasPosition(index)
   }
}

This solution has many disadvantages. It would be better if Kakao added children function to get all children nodes to hide low level api.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions