appium-desktop
appium-desktop copied to clipboard
Android Landscape Orientation: Tap by coordinates appears to tap a different location
The problem
When tapping by coordinates on an Android app in landscape orientation, the actual tap appears to be a different location further to the left. This issue only seems to occur when tapping towards the right end of the screen.
Tapping by coordinates is necessary for our use case as there are no detectable elements on the screen.
Environment
- Appium version: 1.17.0
- Desktop OS/version used to run Appium: 1.15.1/1.17.1
- Node.js version: v13.11.0
- Npm: 6.13.7
- Mobile platform/version under test: Android 10
- Real device or emulator/simulator: S10
- Automation Engine: UIAutomator2
Details
As you move more towards the right of the screen, coordinate tapping seems to become increasingly inaccurate. Tapping on coordinates for a button often don't tap on the button, but an area to the left of the button. This seems to happen for all Android apps tested in landscape orientation.
It's interesting to note that both landscape orientations seem to produce different inaccurate taps when using coordinates.
Portrait Orientation doesn't seem to have this issue.
Example
Device is an S10 running Android 10.
Attached image is an Appium session for the settings app. The coordinates displayed are the location of the button denoted by the red square. Clicking here taps a location further to the left of the button.
https://ibb.co/JqFmN77
I don't think this has anything to do with server stuff, since we just pass the coordinates to the downstream UiAutomator framework. Perhaps, it's an issue of the UI client?