mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Merge pull request #46 from jimboatarm/fix-issue-42
Dismiss work offline banner if it appears
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -104,6 +104,7 @@ public class UiAutomation extends UxPerfUiAutomation { | ||||
|         timer.end(); | ||||
|         results.put("skip_welcome", timer); | ||||
|         sleep(1); | ||||
|         dismissWorkOfflineBanner(); // if it appears on the homescreen | ||||
|     } | ||||
|  | ||||
|     protected void openAndCloseDrawer() throws Exception { | ||||
| @@ -307,6 +308,7 @@ public class UiAutomation extends UxPerfUiAutomation { | ||||
|  | ||||
|         sleep(1); | ||||
|         getUiDevice().pressBack(); | ||||
|         dismissWorkOfflineBanner(); // if it appears on the homescreen | ||||
|         deleteDocument(docName); | ||||
|     } | ||||
|  | ||||
| @@ -386,6 +388,13 @@ public class UiAutomation extends UxPerfUiAutomation { | ||||
|         sleep(1); | ||||
|     } | ||||
|  | ||||
|     public void dismissWorkOfflineBanner() throws Exception { | ||||
|         UiObject banner = new UiObject(new UiSelector().textContains("Work offline")); | ||||
|         if (banner.waitForExists(1000)) { | ||||
|             clickUiObject(BY_TEXT, "Got it", CLASS_BUTTON); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     public void startDumpsys(String viewName) throws Exception { | ||||
|         if (!dumpsysEnabled) | ||||
|             return; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user