Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Bug Report: UIAutomator Fails to Find Test Tags in Navigation Suite Items
Issue Description
When using
material3-adaptive-navigation-suite:1.3.1
withcomposeBom: 2025.01.00
, we observed that UIAutomator cannot locate test tags applied to navigation suite items (Modifier.testTag("item0")
), while Espresso Compose Test can. Additionally, UIAutomator can locate a control test tag (e.g.,Modifier.testTag("HomeScreenTextTag")
) applied to a composable outside of the navigation suite.Expected Behavior
testTag
on navigation suite items (e.g.,"item0"
) in the same way as Espresso.Observed Behavior
Espresso Compose Tests:
"item0"
)."HomeScreenTextTag"
).UIAutomator:
"HomeScreenTextTag"
)."item0"
).Steps to Reproduce
NavigationSuiteEspressoTest
to confirm that Espresso can detect both the navigation suite item ("item0"
) and the control tag ("HomeScreenTextTag"
).NavigationSuiteUiAutomatorTest
to confirm that:"HomeScreenTextTag"
)."item0"
).Reproducible Code
Navigation Suite Test Tag Assignment
In the
MainActivity
:Control Test Tag
In
HomeDestination
:Test Classes
NavigationSuiteEspressoTest
: Confirms Espresso can detect all tags.NavigationSuiteUiAutomatorTest
: Highlights that UIAutomator fails to detect navigation suite tags.Environment
material3-adaptive-navigation-suite:1.3.1
2025.01.00
Additional Notes
This issue suggests that test tags on navigation suite items may not be exposed in the view hierarchy in a way that UIAutomator can access. This affects test automation workflows that rely on UIAutomator to interact with navigation components in Compose applications.