Fix checking for selected topic

Change-Id: If86541613daf44e552df4309243309f80086230a
pull/475/head
mlykotom 2 years ago
parent 5687c8d33a
commit 034a6c4043

@ -45,11 +45,14 @@ fun MacrobenchmarkScope.forYouSelectTopics(recheckTopicsIfChecked: Boolean = fal
// Select some topics to show some feed content
repeat(3) { index ->
val topic = topics.children[index % topics.childCount]
// Selecting topics that are in the first column
val topic = topics.children[(2 * index) % topics.childCount]
// Find the checkable element to figure out whether it's checked or not
val topicCheckIcon = topic.findObject(By.checkable(true))
when {
// Topic wasn't checked, so just do that
!topic.isChecked -> {
!topicCheckIcon.isChecked -> {
topic.click()
device.waitForIdle()
}

Loading…
Cancel
Save