From a8a98a16408de6b5b88105d786da4ebef5ec6745 Mon Sep 17 00:00:00 2001 From: vadimt Date: Fri, 24 May 2019 18:52:21 -0700 Subject: [PATCH] Swiping from Overview to All Apps from apps_view Used to swipe from an app icon, but in the lab, there were icons at weird positions. Change-Id: I271dd800f1b714997282512eb64ebc5d34b24f13 --- tests/tapl/com/android/launcher3/tapl/Overview.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index 1aa957a17e..058831f180 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -51,10 +51,9 @@ public final class Overview extends BaseOverview { // Swipe from an app icon to the top. LauncherInstrumentation.log("Overview.switchToAllApps before swipe"); - final UiObject2 appIcon = mLauncher.waitForLauncherObjectByClass( - "android.widget.TextView"); + final UiObject2 allApps = mLauncher.waitForLauncherObject("apps_view"); mLauncher.swipeToState(mLauncher.getDevice().getDisplayWidth() / 2, - appIcon.getVisibleBounds().centerY(), + allApps.getVisibleBounds().top, mLauncher.getDevice().getDisplayWidth() / 2, 0, 50, ALL_APPS_STATE_ORDINAL);