summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/common/com/android/documentsui/bots/UiBot.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/common/com/android/documentsui/bots/UiBot.java b/tests/common/com/android/documentsui/bots/UiBot.java
index 4ec75bdc6..b63057185 100644
--- a/tests/common/com/android/documentsui/bots/UiBot.java
+++ b/tests/common/com/android/documentsui/bots/UiBot.java
@@ -284,7 +284,8 @@ public class UiBot extends Bots.BaseBot {
// Espresso has flaky results when keyboard shows up, so hiding it for now
// before trying to click on any dialog button
Espresso.closeSoftKeyboard();
- onView(withId(android.R.id.button1)).perform(click());
+ UiObject2 okButton = mDevice.findObject(By.res("android:id/button1"));
+ okButton.click();
}
public void clickDialogCancelButton() throws UiObjectNotFoundException {