I essentially have a custom IdlingResource
that takes a View
a constructor argument. I can\'t find anywhere that really talks about how to implemen
Figured it out. To get the view to pass into an idling resource, all you have to do is take the member variable of your ActivityTestRule
For example:
@Rule
public ActivityTestRule activityTestRule = new ActivityTestRule<>(
MainActivity.class);
and then just call getActivity().findViewById(R.id.viewId)
So the end result is:
activityTestRule.getActivity().findViewById(R.id.viewId);