How can I specify android Instrumentation context when I run my ActivityTestRule test cases?
- 阅读更多 关于 How can I specify android Instrumentation context when I run my ActivityTestRule test cases?
问题 I have one android system with two displays(Display1, display2) connected for my app. my app has an activity that is running on display2. I was trying to use android espresso library to test my activity on display2. Below is my test code: onView(withId(R.id.button_test)).check(matches(isDisplayed())); //This line worked fine, it means espresso found my view successfully. onView(withId(R.id.button_test)).withFailureHandler(new FailureHandler() { @Override public void handle(Throwable error,