Question

I have a menu in my app that i am trying to iterate trough. The menu consists of more than 10 items, but i only want to test the first 5 items (which i can select with either index or based on text).

I am looking for a generic solution that will

  • select menu item 1
  • do a text check
  • select main menu
  • select menu item 2
  • do a text check
  • select main menu
  • etc

However i also need to execute this on multiple devices with different screen sizes, so it has to scroll to the menu item in case its not yet visible on screen.

I've tried using different solutions from these boards, but i have not been able to succeed yet.

Any help would be greatly appreciated.

Was it helpful?

Solution

The issue here is because of a bug in robotium that was fixed after the latest release. The issue in question is https://code.google.com/p/robotium/issues/detail?id=550

The latest code on github does have this fix in (see here, so you could package the source yourself and use that as the latest version otherwise you are going to have to implement some methods that have the same functionality as that changed.

Edit Robotium 5.0.1 is now available and should have the above fix in it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top