Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The value of "bounds" attribute is incorrect on some elements on "Calls" app #641

Open
kimduquan01 opened this issue Jun 7, 2024 · 1 comment

Comments

@kimduquan01
Copy link

Reproduce steps:
- connect to a Android device
- open built-in Calls app
- look up into "bounds" attribute of some elements at the bottom ( see attached image for more detail )
bounds_issue

The value of "bounds" attribute is incorrect, the height value is too small.

@KazuCocoa
Copy link
Member

Perhaps the relevant code is

public static Rect getBounds(@Nullable AccessibilityNodeInfo node) {
int displayId = AxNodeInfoHelper.getAxNodeDisplayId(node);
final boolean isDisplayAccessible = CustomUiDevice.getInstance().getDisplayById(displayId) != null;
Rect screen = null;
if (isDisplayAccessible) {
Point displaySize = CustomUiDevice.getInstance().getDisplaySize(displayId);
screen = new Rect(0, 0, displaySize.x, displaySize.y);
}
if (node == null) {
return screen == null ? new Rect() : screen;
}
return getVisibleBoundsInScreen(
node,
screen,
Boolean.FALSE.equals(Settings.get(SimpleBoundsCalculation.class).getValue()),
0
);
}
. You could debug it if the return values were by the Android OS itself. If it was by Android API (not in the uia2 server's calculation code), unfortunately, nothing can be done on the Appium side right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants