android - NoActivityResumedException when testing activity and fragment -


i have 1 activity on button and, inside activity, added fragment user can choose videos, , then, click on button on activity, , goes activity. i'm testing espresso, , when select videos , try click on button, see this

android.support.test.espresso.noactivityresumedexception: no activities in stage resumed. did forget launch activity. (test.getactivity() or similar)? 

here test

 public void testvideosselecttomix(){     selectvideoat(0);     selectvideoat(1);      // fails @ line: commit button on activity     onview(allof(withid(r.id.commit))).perform(click());     onview(withtext(r.string.title_video_merge_fragment)).check(matches(isdisplayed())); } 

i think may related listener on commit button, calls finish(); why work on emulator/device , not on tests?


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -