title: Invoke ActionBar's Up button press from code
body: <p>I am writing an Android app with ActionBar enabled. In my case I use ActionBarSherlock to provide compatibility, but I think it doesn't matter in this case.</p>
  
  <p>I have an Up button displaying at the left of ActionBar in my Activity. It appears after a call to <code>setHomeAsUpEnabled(true);</code> and it leads to the HomeActivity.</p>
  
  <p>I want to write a test case which checks that Up button press leads to that HomeActivity.
  I am using Robotium to write tests on UI side so I can check the class of the current Activity by following assertion <code>solo.assertCurrentActivity(HomeActivity.class);</code>
  But I have not found a way to invoke a press on an Up button. </p>
  
  <p>I've tried <code>solo.clickOnView(solo.getView(android.R.id.home))</code> and <code>getInstrumentation().invokeMenuActionSync(solo.getCurrentActivity(), android.R.id.home, 0);</code> but none of them works.</p>
  
  <p>Any help would be appreciated.</p>