예제 #1
0
 public void testAddNote() throws Exception {
   solo.clickOnMenuItem("Add note");
   solo.assertCurrentActivity("Expected NoteEditor activity", "NoteEditor");
   solo.enterText(0, "1");
   solo.goBack();
   solo.clickOnMenuItem("Add note");
   solo.enterText(0, "Note2");
   solo.goBackToActivity("NotesList");
   solo.takeScreenshot();
 }
예제 #2
0
 @Override
 protected void runTest() throws Throwable {
   try {
     super.runTest();
   } catch (Throwable t) {
     // save screenshot -- written to /mnt/sdcard/Robotium-Screenshots
     // as <filename>.jpg
     mSolo.takeScreenshot("robocop-screenshot");
     if (mAsserter != null) {
       mAsserter.dumpLog("Exception caught during test!", t);
       mAsserter.ok(false, "Exception caught", t.toString());
     }
     // re-throw to continue bail-out
     throw t;
   }
 }