Closed cheffey closed 3 years ago
I'm using UIAutomator server 4.15.0 because latest appium is using that. Should I try with the newest UIAutomator server release? How could I do so?
Duplicate of https://github.com/appium/appium/issues/14948 Appium gets them via https://developer.android.com/reference/androidx/test/uiautomator/UiDevice#getdisplaywidth . It means Android's API returns the data. Google (or the device's manufacture?) can fix it, but cannot by Appium itself. You can report it to them.
@KazuCocoa This bug barrier my job to test pixel 5. Would you be kind enough to tell me where you think I should post this issue?
issue created on google issue tracker: https://issuetracker.google.com/issues/176710836
@KazuCocoa
Hello, it seems the issue has been resolved from uiautomator side. Maybe we need to upgrade the version of androidx.test.uitomator to 2.3.0 ? Thanks !
The problem
Screen size (which get by java client Dimension size = driver.manage().window().getSize();) is incorrect(height is shorter than expected) in real device: pixel 3 XL and some emulator. And this problem lead to other issues like: tap(java client code: new TouchAction<>(driver).tap(PointOption.point(location.x, location.y)).release().perform();) bottom part will catch illegalArgumentException which tells me it's out of screen bounds, and it's not true just by the screenshot.
Environment
Details
For example in real device pixel 3 XL android 11: appium info ViewportRect(driver.getSessionDetails().get("viewportRect")): [0, 171, 1440, 2450] and the size is (1440, 2621) the screenshot size: 1440x2960
Link to Appium logs
Do not think it's necessary, contact me if it's needed.
Code To Reproduce Issue [ Good To Have ]
Use android studio 4.1 make a new AVD with android 9.0(google APIs) and pixel-4 model. start appium with this device. and run commands: driver.manage().window().getSize(); I got (1080, 1977) driver.getSessionDetails().get("viewportRect"); I got [0, 135, 1080, 1842] take a screenshot. I got with size (1080, 2280) compare the size and viewPortRect with screenshot size.