Testing multiple activities with espresso

前端 未结 4 815
無奈伤痛
無奈伤痛 2020-12-12 22:03

Is it possible to write tests across several activities using the android espresso framework?

4条回答
  •  借酒劲吻你
    2020-12-12 22:45

    I've tested this like:

    onView(withId(R.id.hello_visitor)).perform(click());
    pressBack();
    onView(withId(R.id.hello_visitor)).check(matches(isDisplayed())); //fails here
    

    The click action starts a new activity, obviously.

提交回复
热议问题