mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +00:00 
			
		
		
		
	fw/uiauto: Add method to baseclass to dismiss android version popup
In Android Q a popup will be displayed warning if the application has not been designed for the latest version of android. This has currently been dealt with on a per workload basis however this is a common popup so add a method to dismiss the popup if present to the base class.
This commit is contained in:
		| @@ -547,6 +547,21 @@ public class BaseUiAutomation { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // If an an app is not designed for running on the latest version of android | ||||
|     // (currently Q) dissmiss the warning popup if present. | ||||
|     public void dismissAndroidVersionPopup() throws Exception { | ||||
|         UiObject warningText = | ||||
|             mDevice.findObject(new UiSelector().textContains( | ||||
|                 "This app was built for an older version of Android")); | ||||
|         UiObject acceptButton = | ||||
|             mDevice.findObject(new UiSelector().resourceId("android:id/button1") | ||||
|                                                .className("android.widget.Button")); | ||||
|         if (warningText.exists() && acceptButton.exists()) { | ||||
|             acceptButton.click(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|  | ||||
|     // Override getParams function to decode a url encoded parameter bundle before | ||||
|     // passing it to workloads. | ||||
|     public Bundle getParams() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user