는 버튼 이벤트를
onView을 (isRoot()) 다시 클릭하여 간단하게 수행 (ViewActions.pressBack()).;
androidTestCompile :
당신의 Gradle을이 추가 'com.android.support.test.uiautomator : uiautomator-V18 : 2.1.2'
그리고 테스트에서이 작업을 수행 :
UiDevice mDevice = UiDevice.getInstance (InstrumentationRegistry.getInstrumentation()); mDevice.pressBack();
하고 에스프레소 UI 테스트에서 더 좋아하는 경우에, GitHub의에서보기 프레소 데모 프로젝트 :이 데모 프로젝트에서 https://github.com/ranaNarin/Espresso-Android
, 모든 시나리오에서 구현 에스프레소 - 가까운 글고, 버튼, 옵션 메뉴를 클릭, 탐색 서랍을 열고 재활용 도구보기 항목을 클릭하고 카메라를 연 다음 Espresso UI 테스팅을 사용하여 이미지를 클릭하십시오.
감사합니다. 유일한 솔루션을 찾지 못했고 테스트를 통과하지 못한 모든 대화 상자를 처리하기로 결정했습니다. – Andrei