I am writing test cases for my app using Robotium. The app uses ActionbarSherlock for porting the Actionbar on versions prior to 4.0. However the ActionBar items always seem elusive to get hold of. I tried to use this project - https://github.com/atermenji/robotium-actionbarsherlock but didn't have much luck with custom actionbars. I tried the following code:
solo.clickOnVisibleActionbarItem(com.vtcreator.android360.R.id.notification_icon);
R.id.notification_icon is a button defined in the custom action bar layout.
Anyone with experience of both Robotium and ABS?
Since you have source code access anyway, you can choose to access the ActionBar item on a view level.
View actionbarItem1 = solo.getView(R.id.notification_icon);
solo.clickOnView(actionbarItem1);