Skip to content

Commit

Permalink
Short sleep before finding root view in onRecyclerView
Browse files Browse the repository at this point in the history
  • Loading branch information
amberin authored May 7, 2024
1 parent 914beb3 commit 2fb32e8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import android.content.res.Resources;
import android.os.Build;
import android.os.SystemClock;
import android.text.Spanned;
import android.text.style.ClickableSpan;
import android.view.KeyEvent;
Expand Down Expand Up @@ -187,6 +188,7 @@ public static ViewInteraction onSavedSearch(int position) {
}

public static ViewInteraction onRecyclerViewItem(@IdRes int recyclerView, int position, @IdRes int childView) {
SystemClock.sleep(500);
onView(isRoot()).perform(waitId(recyclerView, 5000));
onView(withId(recyclerView)).perform(RecyclerViewActions.scrollToPosition(position));
return onView(new EspressoRecyclerViewMatcher(recyclerView)
Expand Down

0 comments on commit 2fb32e8

Please sign in to comment.