Appium is returning wrong orientation for Google Pixel C Tablet
See original GitHub issueThe problem
There is a problem with screen orientation returned by appium on Google Pixel C tablet. When it’s on landscape Appium is returning Portrait and the opposite. Issue exists on .Net and Java client. The issue is only on this specific device - it’s not related to android version (already checked on another android 7 device). We created sample application which is returning current screen orientation to label text and it’s working correctly, also on system rotation lock (notification bar on the top of the screen) we have information on current orientation and it’s returned correctly. Can you please track how appium gets information about orientation and why Android returns it correctly (via app/notification bar) and Appium doesn’t?
Also screen rotation is working in opposite way. Trying to set landscape is rotating device to portrait and opposite.
Screen and logs attached:
Environment
- Appium version (or git revision) that exhibits the issue: 1.8.0, 1.9.2-beta.2
- Desktop OS/version used to run Appium:
- Node.js version (unless using Appium.app|exe): 7.7.3
- Mobile platform/version under test: Android 7 Google Pixel C tablet
- Real device or emulator/simulator: real device
- Appium CLI or Appium.app|exe: appium cli
Link to Appium logs
https://gist.github.com/GrzegorzSidwa/da29c5593c35085f34f12bcdecb9980a
Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top GitHub Comments
In appium@beta a new setting was added named
useResourcesForOrientationDetection
. If this setting is set totrue
then the server tries to use the Configuration object to determine device orientation rather than guess it based on the current rotation value. Please try it and let us know if that helpsClosed because of no response