It sure does, but they don't work reliably, if at all.
Robotium 4.0
Android OS 2.3.3
ABS - latest version as of this writing.
On Thursday, January 31, 2013 12:20:46 PM UTC-7, Artur Termenji wrote:Robotium has methods to work with ActionBar, they are : solo.clickOnActionBarItem(), and solo.clickOnActionBarHomeButton()
среда, 30 января 2013 г., 21:46:56 UTC+2 пользователь RamS написал:For my current project which makes use of ActionBar to introduce Back Key and Certain Icons as Image Buttons used following codes :// Selecting Back function button on Action Bar
ActionBarView actionBar= (ActionBarView)solo.getView(<appPakcageName>.R.id.abs__action_bar);
ImageView backUpKey = (ImageView)actionBar.findViewById(<appPakcageName>.R.id.abs__home);
solo.clickOnView(backUpKey);
// Click on Tools Icon[which is the 3rd Image Button] on Action Bar Menu
solo.clickOnImageButton(2);
Hope this helps!
~Ramdas
--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.
To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Hi, how do you click the home button for ActionBarSherlock on pre ICS?I have tried solo.onClickView(solo.getView(android.R.id.home)), and also the solo action bar related methods, none of them work.
On Friday, 29 March 2013 09:45:32 UTC+11, Artur Termenji wrote:Robotium ActionBar methods should work except you are testing an app with ActionBarSherlock on pre ICS.An API is different there.Also this can depend on the manufacturer.
четверг, 9 февраля 2012 г., 19:18:43 UTC+2 пользователь Eugene Beletskiy написал:
Hello,Does anybody know how to access menu items located in ActionBar (Honeycomb, ICS) if menu items are a composition of items which belong to Fragments. My Activity doesn't have Menu, but Fragments of which this Activity consists of do have. The solo.pressMenuItem(int x) just doesn't work for me because it searches for the Menu of current Activity which is empty.Thank a lot.
--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.
To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
log_clear_logs));
Am Donnerstag, 28. März 2013 23:45:32 UTC+1 schrieb Artur Termenji:Robotium ActionBar methods should work except you are testing an app with ActionBarSherlock on pre ICS.An API is different there.Also this can depend on the manufacturer.
With ABS the following works:
import com.actionbarsherlock.internal.view.menu.MenuView;
...public void clickOnActionBarItem(int resourceId) {
List<View> views = solo.getCurrentViews();
for (View v : views) {
if (v instanceof MenuView.ItemView) {
MenuView.ItemView itemView = (MenuView.ItemView) v;
if (itemView.getItemData().getItemId() != resourceId) {
continue;
}
solo.clickOnView(v);
return;
}
}
}However, I did not get solo.clickOnActionBarItem(int) to work on the native action bar. It seems to simply ignore this completely.
Hi, Richard.I've wrote some code to perform clicks on ActionBar menu and Home items on pre ICS.You can find it here: https://github.com/atermenji/robotium-actionbarsherlock
четверг, 25 апреля 2013 г., 14:20:57 UTC+3 пользователь Richard Lay написал:
Hi, how do you click the home button for ActionBarSherlock on pre ICS?I have tried solo.onClickView(solo.getView(android.R.id.home)), and also the solo action bar related methods, none of them work.
On Friday, 29 March 2013 09:45:32 UTC+11, Artur Termenji wrote:
Robotium ActionBar methods should work except you are testing an app with ActionBarSherlock on pre ICS.An API is different there.Also this can depend on the manufacturer.
четверг, 9 февраля 2012 г., 19:18:43 UTC+2 пользователь Eugene Beletskiy написал:
Hello,
--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotium-develo...@googlegroups.com.
To post to this group, send email to robotium-...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotium-developers.
For more options, visit https://groups.google.com/d/optout.