Ranorex Studio introduces initial support for Android applications built with Jetpack Compose.
What to Expect
Here are some current behaviors to keep in mind when testing Jetpack Compose apps:
- Partial property exposure: Some UI components (e.g., Button, RadioButton, SearchBar) do not expose expected properties such as Pressed or Checked. This is a limitation of Jetpack Compose itself; many internal states are not accessible via the LayoutNode structure used by the framework.
- Role and class name variations: Some components may not provide accessible role values or platform class names, which can affect how reliably they are detected by automation tools.
- Minimal metadata for layout containers: Elements like Column, Row, or Scaffold may lack identifiable metadata, sometimes appearing as generic or unknown in Ranorex Spy.
- Custom components and composables: If a component is compiled in a way that strips automation-relevant data, Ranorex will not be able to read or map it properly.
- TextField variations: In some cases, TextField elements delegate state management to parent components, which may not appear correctly in the UI hierarchy.
- Implementation-specific behavior: Recognition and compatibility can vary depending on how the app is built. Apps using older Compose versions or unconventional implementation practices may experience reduced detection or unexpected behavior.
Recommendations
To improve testability and element recognition in Ranorex:
- Use TestTag attributes on important UI elements. Ranorex supports TestTag, and adding it greatly enhances element detection.
- Avoid deeply nested custom composables that contain interactive elements, unless strictly necessary. This helps Ranorex access the component structure more effectively.