title: Robotium - Trying to click home button in app
body: <p>I'm new to <code>robotium</code> and i'm trying to write a quick and dirty script to run through all screens in an app.</p>
  
  <p>The problem i have  mainly with the 'home button' in the app. I've tried lots of options but i cant seem to get it to click there except with index, which is not what i want.</p>
  
  <p>When i check out the button with the <code>hierarchyviewer</code> it looks like this: </p>
  
  <p><a href="http://postimg.org/image/qbsn9zy7n/" rel="nofollow">Link</a></p>
  
  <p>However when i try for example: </p>
  
  <pre><code>assertTrue(
  "Wait for text (id: myapp.R.id.home) failed.",
  solo.waitForImageById("myapp.R.id.home", 20000));
  solo.clickOnImage((ImageView) solo.findViewById("myapp.R.id.home"));            
  solo.waitForActivity("MenuActivity");
  </code></pre>
  
  <p>It fails at the <code>waitForImageByID</code> line. Ive tried multiple options like <code>waitForImageButton</code> etc, but i just cant seem to get it clicked. What am i missing here?</p>
  
  <pre><code>junit.framework.AssertionFailedError: View with id: '0' is not found!
  at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1990)
  at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1970)
  at com.bitbar.recorder.extensions.OtherUtils.a(OtherUtils.java:246)
  at com.bitbar.recorder.extensions.OtherUtils.b(OtherUtils.java:241)
  at com.bitbar.recorder.extensions.v.a(Waiter.java:71)
  at com.bitbar.recorder.extensions.ExtSolo.waitForImageButtonById(ExtSolo.java:4176)
  at com.example.android.apis.test.Test.testRecorded(Test.java:137)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
  at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1740)
  </code></pre>