android / android/android-test

uiautomator getVisibleBounds can not get bottom exactly on devices with virtual keys such as Galaxy Note 9

Open
#392 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
11h 29m
Merged PRs (30d)
2

Description

### Description
uiautomator getVisibleBounds can not get bottom exactly on devices with virtual keys such as Galaxy Note 9

### Steps to Reproduce
1.get a device with virtual key ,such as Galaxy Note 9 and hide virtual key
2.start an activity with textview in main layout, the id of main layout is "activity_main"
3.start uiautomator test
4.UiObject mainLayout getVisibleBounds()
5.get value of bottom

### Expected Results
the value of bottom is 2220
### Actual Results
the value of bottom is 2094
### AndroidX Test and Android OS Versions
com.android.support.test.uiautomator:uiautomator-v18:2.1.3
android 8.1.0
### Link to a public git repo demonstrating the problem:

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Galaxy Note 9 case from the listed steps and inspect the UiObject.getVisibleBounds() entry point used for the activity_main layout. Compare the returned bottom value with the expected 2220 when virtual keys are hidden; done means the visible bounds report the correct bottom on devices with virtual keys without breaking other devices.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.