Troubleshoot element detection issues in automated tests
Learn how to resolve issues where your automated tests can’t detect app elements on Android devices.
Issue
Your tests can’t locate certain elements in your app when using Android devices, so element lookups fail or time out.
Cause
On Android devices, the app source tree excludes elements that aren’t visible to the user. As a result, dynamically rendered and off-screen elements are missing and your tests can’t find them.
Resolution
To include these elements in the source tree, set appium:settings[allowInvisibleElements] to true in your test configuration:
Run your tests again and confirm that they locate the elements.
Don’t use the disableSuppressAccessibilityService capability to work around element detection issues. Setting that capability to false can prevent App Accessibility from generating reports on Android devices. For details, see Troubleshoot report generation issues in automated tests.
Related links
- App Accessibility automated testing configuration options
- Troubleshoot report generation issues in automated tests
- App Accessibility automated testing overview
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!