Compose
Compose copied to clipboard
Add API to get children from specific node
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.