How to use getAllOpenedActivities(), getActivityMonitor(), setActivityOrientation(), getButton(); getCurrentButton(), methods? I'am new for Robotium even i dont know how to use any get method, Please anyone help me to explain with example. It'll more helpful for me. Thanks in Advance.
Asked
Active
Viewed 129 times
1 Answers
0
To use any of the methods, you need to create a Solo
object. Like this:
@Override
protected void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
Then in your test method you call the method:
public void testYourTest() throws IOException{
solo.clickOnText("Menu");
solo.getButton("Button 1");
etc.
}
I would recommend that you reference the javadoc that Robotium provides. It was included in the file you downloaded as a .jar file. You need to change the extension (.jar) to zip (.zip).
Hope this helps!

BlackHatSamurai
- 23,275
- 22
- 95
- 156