From 842df99e413aa2eb9512d1429b7ee16f71750ff1 Mon Sep 17 00:00:00 2001 From: kimdowoo Date: Mon, 9 Oct 2023 02:39:47 +0900 Subject: [PATCH] Apply consistent use of waitAndFindObject extension --- .../samples/apps/nowinandroid/interests/InterestsActions.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/interests/InterestsActions.kt b/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/interests/InterestsActions.kt index d9c563ebc..c359ae87e 100644 --- a/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/interests/InterestsActions.kt +++ b/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/interests/InterestsActions.kt @@ -20,6 +20,7 @@ import androidx.benchmark.macro.MacrobenchmarkScope import androidx.test.uiautomator.By import androidx.test.uiautomator.Until import com.google.samples.apps.nowinandroid.flingElementDownUp +import com.google.samples.apps.nowinandroid.waitAndFindObject fun MacrobenchmarkScope.goToInterestsScreen() { device.findObject(By.text("Interests")).click() @@ -34,7 +35,7 @@ fun MacrobenchmarkScope.goToInterestsScreen() { } fun MacrobenchmarkScope.interestsScrollTopicsDownUp() { - val topicsList = device.wait(Until.findObject(By.res("interests:topics")), 2_000) + val topicsList = device.waitAndFindObject(By.res("interests:topics"), 2_000) device.flingElementDownUp(topicsList) }