Slide 33
Slide 33 text
MERGED NODE TREE
UNMERGED NODE TREE
onNode(hasText("Schedule a task"), useUnmergedTree = true)
.assertHasClickAction()
Error
onNode(hasText("Schedule a task"))
.assertHasClickAction()
useUnmergedTree = false
Printing with useUnmergedTree = ‘true’
Node #1 at (l=0.0, t=74.0, r=1080.0, b=2012.0)px
|-Node #2 at (l=247.0, t=956.0, r=834.0, b=1130.0)px
Role = 'Button'
Focused = 'false'
Actions = [OnClick]
MergeDescendants = 'true'
|-Node #4 at (l=321.0, t=1006.0, r=395.0, b=1080.0)px
| ContentDescription = '[Schedule a task]'
| Role = 'Image'
|-Node #5 at (l=420.0, t=1014.0, r=785.0, b=1072.0)px
Text = '[Schedule a task]'
Actions = [GetTextLayoutResult]
Printing with useUnmergedTree = ‘false’
Node #1 at (l=0.0, t=74.0, r=1080.0, b=2012.0)px
|-Node #2 at (l=247.0, t=956.0, r=834.0, b=1130.0)px
Role = 'Button'
Focused = 'false'
ContentDescription = '[Schedule a task]'
Text = '[Schedule a task]'
Actions = [OnClick, GetTextLayoutResult]
MergeDescendants = 'true'
composeTestRule
.onRoot(useUnmergedTree = false)
.printToLog("MERGED")
composeTestRule
.onRoot(useUnmergedTree = true)
.printToLog("UNMERGED")