mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-18 01:34:08 +01:00
Handle the common chrome browser popup messages.
The Chrome browser presents a number of popups when run for the first time. This update handles those popup messages.
This commit is contained in:
Binary file not shown.
@@ -47,7 +47,7 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
@Test
|
||||
public void setup() throws Exception{
|
||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||
clearFirstRun();
|
||||
dismissChromePopup();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -61,20 +61,6 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
unsetScreenOrientation();
|
||||
}
|
||||
|
||||
public void clearFirstRun() throws Exception {
|
||||
UiObject accept =
|
||||
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/terms_accept")
|
||||
.className("android.widget.Button"));
|
||||
if (accept.exists()){
|
||||
accept.click();
|
||||
UiObject negative =
|
||||
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/negative_button")
|
||||
.className("android.widget.Button"));
|
||||
negative.waitForExists(100000);
|
||||
negative.click();
|
||||
}
|
||||
}
|
||||
|
||||
public void runBenchmark() throws Exception {
|
||||
UiObject start =
|
||||
mDevice.findObject(new UiSelector().description("Start Test")
|
||||
|
Reference in New Issue
Block a user