Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to get children from specific node #27

Open
AJIEKCX opened this issue Apr 1, 2022 · 0 comments
Open

Add API to get children from specific node #27

AJIEKCX opened this issue Apr 1, 2022 · 0 comments

Comments

@AJIEKCX
Copy link

AJIEKCX commented Apr 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant