I have a test in which I need to click on the button located on the toolbar. This button does not have an ID, but it has the name of the class - ImageButton. How can I click on it using Espresso or Barista? I can not do this because I do not have id
onView(...).perform(click());
Trying to use Baristo, but this does not work:
click(withClassName(ImageButton.class));