草庐IT

CustomGeneralClickAction

全部标签

android - 单击 espresso 中的 FloatingActionButton

尝试在espresso测试中点击FloatingActionButton。onView(withId(R.id.actionButton)).perform(customClick())我的方法customClick:funcustomClick():ViewAction{returnactionWithAssertions(CustomGeneralClickAction(Tap.SINGLE,GeneralLocation.VISIBLE_CENTER,Press.FINGER))}同时创建类CustomGeneralClickAction并进行一些更改:Matcherstanda