//Clicks on Delete in the context menu
solo.clickOnText("(?i).*?Delete.*");
actual = solo.searchText("Note 2");
//Assert that Note 2 is not found
assertEquals("Note 2 is found", expected, actual);
}
@Override
public void tearDown() throws Exception {
try {
//Robotium will finish all the activities that have been opened
solo.finalize();
} catch (Throwable e) {
e.printStackTrace();
}
getActivity().finish();
super.tearDown();
}
}
原文转自:http://blog.csdn.net/xyz_lmn/article/details/6899905