mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +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(); |         timer.end(); | ||||||
|         results.put("skip_welcome", timer); |         results.put("skip_welcome", timer); | ||||||
|         sleep(1); |         sleep(1); | ||||||
|  |         dismissWorkOfflineBanner(); // if it appears on the homescreen | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected void openAndCloseDrawer() throws Exception { |     protected void openAndCloseDrawer() throws Exception { | ||||||
| @@ -307,6 +308,7 @@ public class UiAutomation extends UxPerfUiAutomation { | |||||||
|  |  | ||||||
|         sleep(1); |         sleep(1); | ||||||
|         getUiDevice().pressBack(); |         getUiDevice().pressBack(); | ||||||
|  |         dismissWorkOfflineBanner(); // if it appears on the homescreen | ||||||
|         deleteDocument(docName); |         deleteDocument(docName); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -386,6 +388,13 @@ public class UiAutomation extends UxPerfUiAutomation { | |||||||
|         sleep(1); |         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 { |     public void startDumpsys(String viewName) throws Exception { | ||||||
|         if (!dumpsysEnabled) |         if (!dumpsysEnabled) | ||||||
|             return; |             return; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user