Merge pull request #983 from KDW03/feature/consistent-waitAndFindObject

Apply consistent use of waitAndFindObject extension
pull/999/head
Don Turner 1 year ago committed by GitHub
commit 340753b2c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
}

Loading…
Cancel
Save