I'm currently spiking out calabash-android and trying to test navigation when clicking the ActionBar.
I'm using the ActionBarCompat project for this spike and noticed that, when deployed on a 4.0 emulator, despite the fact that the "Home Icon" of the ActionBar has the id "android.R.id.home" , calabash isn't able to find the id when I use the built in step '
Then I press view with id "home" '
I'm curious to know if anyone else has run into this issue or similar with the ActionBar and if so, what you've done.
It seems that (although VERY hacky) adding this into the onCreate() method of the activity under test:
View home = findViewById(android.R.id.home);
if (home != null)
home.setContentDescription("foobar");
Then using the step ' Then I press "foobar" ' works. Again, this is VERY much a hack so I'm hoping for some better insight into testing ActionBar navigation.
Thanks!
++dave;