I am writing a test for MaterialDatePicker. Trying to click the OK button currently.
This code here,
onView(withTagValue(equalTo(MaterialDatePicker.CONFIRM_BUTTON_TAG))).performClick();
Returns the error,
error: CONFIRM_BUTTON_TAG is not public in MaterialDatePicker; cannot be accessed from outside package
However in MaterialDatePickerTestUtils it seems to work? Link
UPDATE 1
onView(withId(R.id.confirm_button)).inRoot(isDialog()).perform(click());
Finds the button, but the error is that the view has no content.
Aucun commentaire:
Enregistrer un commentaire