3

I would like to know is there any way to access to Android menu with help of Robotium framework? (http://code.google.com/p/robotium/) I want to programmatically select GPS activation line from menu. Is it possible with Robotium?

Trott
  • 66,479
  • 23
  • 173
  • 212
Artak
  • 31
  • 2

3 Answers3

2

To use Robotium to access the menu in your own application, simply use

Solo solo = new Solo(getInstrumentation(), getActivity());
solo.clickOnMenuItem("MENU ITEM TEXT HERE");
Micah Hainline
  • 14,367
  • 9
  • 52
  • 85
1

I actually use something a bit different:

solo.sendKey(Solo.MENU);
solo.clickOnText("MenuItemText");
Booger
  • 18,579
  • 7
  • 55
  • 72
0

not for another app in which you cannot insert the robotium framework..

if that Android device menu was part of your app than yes you could but that is not the case.

There is a visual testing library framework you could use though which would fit this test case..

Look on my blog for the link, it was posted in Oct or November: MobileBytes

Fred Grott
  • 3,505
  • 1
  • 23
  • 18
  • This functionality doesn't require an additional library, as there are simple ways to do this with existing robotium frameword. – Booger Feb 03 '12 at 17:34