I use Robotium as the library for Junit test for my Android application. I wrote some tests which works well. But when I try to write a test for native ActionBar\'s
In our application Home button eventually calls NavUtils.navigateUpFromSameTask. When using
solo.clickOnActionBarHomeButton();
to click Home button, it doesn't work. However, I have noticed that solo.clickOnScreen clicks on Home button reliably. So we use this method instead of solo.clickOnActionBarHomeButton:
protected void clickOnHome() {
solo.clickOnScreen(50, 50); //usually hits Home button
}