我们目前有一款Android应用程序,我们正在使用Espresso进行测试。我们要测试的功能之一是从本地图库中选择一张图片/图像。我们可以一路调出图库视图,但无法在最终的窗口中从最近,下载,图库中进行选择。以下是我们所做的一个片段。如何使用Espresso点击Android Gallery
public void testShouldBeAbleToSelectPhotoFromGallery() {
getActivity();
// given
onView(withId(launch_gallery_button)).perform(click());
onView(withText("Gallery")).perform(click()); // this is a button in our app
// then we get stuck :(
}
谢谢!
感谢开始玩uiAutomator。它看起来更有希望。 – user3298441 2014-10-26 16:29:25