onView(withParent(withId(buttonContainer)),withId(datePickerLaunchViewId)).perform(click());
In the above line, I get "Cannot resolve symbol buttonContainer". What is expected there?
In my case, I use a TextView of "inputType=date" and i'm not sure where to perform a click.
I'm tried using the code from here Select Date from Calendar in Android Espresso and have this in the same class.
onView(isAssignableFrom(DatePicker.class)).perform(PickerActions.setDate(2020, 06, 01));
setDate(R.id.button8, 2017, 1, 1);
public static void setDate(int datePickerLaunchViewId, int year, int monthOfYear, int dayOfMonth) {
onView(withParent(withId(buttonContainer)),withId(datePickerLaunchViewId)).perform(click());
onView(isAssignableFrom(DatePicker.class)).perform(PickerActions.setDate(year, monthOfYear, dayOfMonth));
onView(withId(android.R.id.button1)).perform(click());
}