1
0
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:
scojac01
2020-03-25 10:50:47 +00:00
committed by Marc Bonnici
parent 06ba8409c1
commit 9a931f42ee
4 changed files with 22 additions and 15 deletions

View File

@@ -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")