mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 15:12:25 +00:00 
			
		
		
		
	Googleplaybooks: Adding support for night reading dialogues.
Certain devices present a night time reading popup alert when opening the books workload. This can throw off the workload so I've added a function to check for this and dismiss if neccessary.
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -617,6 +617,8 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface | |||||||
|         // becomes visible on the screen. Therefore add pause instead. |         // becomes visible on the screen. Therefore add pause instead. | ||||||
|         sleep(3); |         sleep(3); | ||||||
|  |  | ||||||
|  |         dismissNightLight(); | ||||||
|  |  | ||||||
|         if (!activityReader.waitForExists(viewTimeout)) { |         if (!activityReader.waitForExists(viewTimeout)) { | ||||||
|             throw new UiObjectNotFoundException("Could not find \"activity reader view\"."); |             throw new UiObjectNotFoundException("Could not find \"activity reader view\"."); | ||||||
|         } |         } | ||||||
| @@ -692,4 +694,12 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface | |||||||
|         } |         } | ||||||
|         return page; |         return page; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private void dismissNightLight() throws Exception { | ||||||
|  |         UiObject night =  | ||||||
|  |             mDevice.findObject(new UiSelector().text("Night Light makes reading easy")); | ||||||
|  |         if (night.exists()) { | ||||||
|  |             clickUiObject(BY_TEXT, "DISMISS"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user