Allowing both normal-case and uppercase versions of widget prompt
am: 44515f42c0
Change-Id: If4b2d7e4b9e8649a175e60cfee6520f2cb28d108
This commit is contained in:
commit
beb70a5aa4
|
@ -19,7 +19,11 @@ package com.android.launcher3.tapl;
|
|||
import androidx.test.uiautomator.By;
|
||||
import androidx.test.uiautomator.UiObject2;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class AddToHomeScreenPrompt {
|
||||
private static final Pattern ADD_AUTOMATICALLY =
|
||||
Pattern.compile("ADD AUTOMATICALLY|Add automatically");
|
||||
private final LauncherInstrumentation mLauncher;
|
||||
private final UiObject2 mWidgetCell;
|
||||
|
||||
|
@ -33,9 +37,6 @@ public class AddToHomeScreenPrompt {
|
|||
public void addAutomatically() {
|
||||
mLauncher.waitForObjectInContainer(
|
||||
mWidgetCell.getParent().getParent().getParent().getParent(),
|
||||
By.text(LauncherInstrumentation.isAvd()
|
||||
? "ADD AUTOMATICALLY"
|
||||
: "Add automatically")).
|
||||
click();
|
||||
By.text(ADD_AUTOMATICALLY)).click();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue