mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
workloads/androbench: Fix for devices running Android 8.1
On some devices running Android 8.1 the start benchmark button was failing to be clicked, this is a workaround to click on the coordinates of the button instead of the UiObject iteslf.
This commit is contained in:
parent
ae4fdb9e77
commit
1b58390ff5
@ -18,6 +18,7 @@ package com.arm.wa.uiauto.androbench;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.graphics.Rect;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
import android.support.test.uiautomator.UiObject;
|
||||
import android.support.test.uiautomator.UiObjectNotFoundException;
|
||||
@ -59,7 +60,8 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
} else {
|
||||
UiObject bench =
|
||||
mDevice.findObject(new UiSelector().resourceIdMatches("com.andromeda.androbench2:id/btnStartingBenchmarking"));
|
||||
bench.click();
|
||||
Rect bounds = bench.getBounds();
|
||||
mDevice.click(bounds.centerX(), bounds.centerY());
|
||||
}
|
||||
UiObject btn_yes= mDevice.findObject(selector.textContains("Yes")
|
||||
.className("android.widget.Button"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user