mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +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:
		| @@ -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")); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user