I am working with a production APK of my customer, and I'm trying through Appium inspector to get interface elements to be able to find it in my JUnit test. There is some way to inspect those elements?
Thank you
For privacy reasons, I have hidden the preview screen
You should be able to locate elements on Android using UIAutomatorViewer.
The uiautomatorviewer tool provides a convenient visual interface to inspect the layout hierarchy and view the properties of UI components that are visible on the foreground of the device. This information lets you create more fine-grained tests using UI Automator. For example, you can create a UI selector that matches a specific visible property.
To launch the uiautomatorviewer tool:
- Launch the target app on a physical device.
- Connect the device to your development machine.
- Open a terminal window and navigate to the /tools/ directory.
- Run the tool with this command: $uiautomatorviewer
You can find more information HERE
Currently there is a lack of classes due to an issue with React Native 0.57 and higher, I registered it here: Issue on GitHub
You either need to: add 'testID' for iOS or 'accessibilityLabel' for Android to see 'content-desc' attribute. This is currently the only type of element recognision you can add that will be visible for Appium. You can also try and use the Android UiSelector with 'MobileBy.AndroidUIAutomator'