mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
Update framework to wait for object before dismissing chrome popup
* Added wait for exist for google terms accept. * Reduced wait time for device sync negative button to reduce workload run time.
This commit is contained in:
parent
3be00b296d
commit
c9ddee761a
@ -586,20 +586,21 @@ public class BaseUiAutomation {
|
|||||||
acceptButton.click();
|
acceptButton.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If Chrome is a fresh install then these popups may be presented
|
// If Chrome is a fresh install then these popups may be presented
|
||||||
// dismiss them if visible.
|
// dismiss them if visible.
|
||||||
public void dismissChromePopup() throws Exception {
|
public void dismissChromePopup() throws Exception {
|
||||||
UiObject accept =
|
UiObject accept =
|
||||||
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/terms_accept")
|
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/terms_accept")
|
||||||
.className("android.widget.Button"));
|
.className("android.widget.Button"));
|
||||||
if (accept.exists()){
|
if (accept.waitForExists(3000)){
|
||||||
accept.click();
|
accept.click();
|
||||||
UiObject negative =
|
UiObject negative =
|
||||||
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/negative_button")
|
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/negative_button")
|
||||||
.className("android.widget.Button"));
|
.className("android.widget.Button"));
|
||||||
negative.waitForExists(100000);
|
if (negative.waitForExists(10000)) {
|
||||||
negative.click();
|
negative.click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UiObject lite =
|
UiObject lite =
|
||||||
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/button_secondary")
|
mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/button_secondary")
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user