|
|
||||||||
PREV CLASS NEXT CLASS |
|||||||||
com.jayway.android.robotium.solo
Class Solo
com.jayway.android.robotium.solo.Solo
public classSolo
extendsObject
This class contains all the methods that the sub-classes have. It supports test cases that span over multiple activities.
Robotium has full support for Activities, Dialogs, Toasts, Menus and Context Menus. When writing tests there is no need to plan for or expect new activities in the test case. All is handled automatically by Robotium-Solo. Robotium-Solo can be used in conjunction
with ActivityInstrumentationTestCase2. The test cases are written from a user perspective were technical details are not needed. Example of usage (test case spanning over multiple activities):
public void setUp() throws Exception {
solo = new Solo(getInstrumentation(), getActivity());
}
public void testTextShows() throws Exception {
solo.clickOnText("Categories");
solo.clickOnText("Other");
solo.clickOnButton("Edit");
solo.searchText("Edit Window");
solo.clickOnButton("Commit");
assertTrue(solo.searchText("Changes have been made successfully"));
}
Author:
Renas Reda, renas.reda@jayway.com
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
|
static int |
Constructor Summary |
|
Solo(android.app.Instrumentation inst, |
|
Method Summary |
|||
void |
assertCurrentActivity(String message,Class expectedClass) |
||
void |
assertCurrentActivity(String message,Class expectedClass, |
||
void |
assertCurrentActivity(String message,String name) |
||
void |
assertCurrentActivity(String message,String name, |
||
void |
assertMemoryNotLow() |
||
void |
clearEditText(android.widget.EditText editText) |
||
void |
clearEditText(int index) |
||
ArrayList<android.widget.TextView> |
clickInList(int line) |
||
ArrayList<android.widget.TextView> |
clickInList(int line, |
||
void |
clickLongOnScreen(float x, |
||
void |
clickLongOnScreen(float x, |
||
void |
clickLongOnText(String text) |
||
void |
clickLongOnText(String text, |
||
void |
clickLongOnText(String text, |
||
void |
clickLongOnText(String text, |
||
void |
clickLongOnTextAndPress(String text, |
||
void |
clickLongOnView(android.view.View view) |
||
void |
clickLongOnView(android.view.View view, |
||
void |
clickOnButton(int index) |
||
void |
clickOnButton(String name) |
||
void |
clickOnCheckBox
|