Description: I want to replace the default Android TimePicker with the new MaterialTimePicker, but testing it is difficult compared to the normal TimePicker. Espresso picker action is not working for the new time picker. what is the way to set the time for a new time picker for the UI test.
Old way:
// Sets a time in a time picker widget
onView(isAssignableFrom(TimePicker::class.java)).perform(
setTime(
calendar.get(Calendar.HOUR_OF_DAY),
calendar.get(Calendar.MINUTE)
)
)