/** * Create new instance matching an element with given resourceId. * * @param resourceId Identifier for this element. * * @return New element instance for actions and assertions. * * @since Espresso Macchiato 0.1 */ public static EspButton byId(int resourceId) { return new EspButton(resourceId); }
/** * Create new instance matching an element with given text. * * @param text Identifier for this element. * * @return New element instance for actions and assertions. * * @since Espresso Macchiato 0.2 */ public static EspButton byText(String text) { return new EspButton(withText(text)); }
public EspButton confirm() { return new EspButton(R.id.buttonConfirm); }
@Test public void testTemplateConstructor() { EspButton template = EspButton.byText(buttonText); this.espButton = new EspButton(template); this.espButton.assertIsVisible(); } }