Android Robitium Solo语法知识
|
| ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY:NESTED|FIELD|CONSTR|METHOD | DETAIL:FIELD|CONSTR|METHOD |
com.jayway.android.robotium.solo
Class Solo
java.lang.Object
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, [email protected]
Field Summary | |
staticint | DELETE |
staticint | DOWN |
staticint | ENTER |
staticint | LANDSCAPE |
staticint | LEFT |
staticint | MENU |
staticint | PORTRAIT |
staticint | RIGHT |
staticint | UP |
Constructor Summary | |
Solo(android.app.Instrumentationinst, android.app.Activityactivity) |
|
Method Summary | ||
void | assertCurrentActivity(Stringmessage,ClassexpectedClass) | |
void | assertCurrentActivity(Stringmessage,ClassexpectedClass, booleanisNewInstance) | |
void | assertCurrentActivity(Stringmessage,Stringname) | |
void | assertCurrentActivity(Stringmessage,Stringname, booleanisNewInstance) | |
void | assertMemoryNotLow() | |
void | clearEditText(android.widget.EditTexteditText) | |
void | clearEditText(intindex) | |
ArrayList<android.widget.TextView> | clickInList(intline) | |
ArrayList<android.widget.TextView> | clickInList(intline, intindex) | |
void | clickLongOnScreen(floatx, floaty) | |
void | clickLongOnScreen(floatx, floaty, inttime) | |
void | clickLongOnText(Stringtext) | |
void | clickLongOnText(Stringtext, intmatch) | |
void | clickLongOnText(Stringtext, intmatch, booleanscroll) | |
void | clickLongOnText(Stringtext, intmatch, inttime) | |
void | clickLongOnTextAndPress(Stringtext, intindex) | |
void | clickLongOnView(android.view.Viewview) | |
void | clickLongOnView(android.view.Viewview, inttime) | |
void | clickOnButton(intindex) | |
void | clickOnButton(Stringname) | |
void | clickOnCheckBox(intindex) | |
void | clickOnEditText(intindex) | |
void | clickOnImage(intindex) | |
void | clickOnImageButton(intindex) | |
void | clickOnMenuItem(Stringtext) | |
void | clickOnMenuItem(Stringtext, booleansubMenu) | |
void | clickOnRadioButton(intindex) | |
void | clickOnScreen(floatx, floaty) | |
void | clickOnText(Stringtext) | |
void | clickOnText(Stringtext, intmatch) | |
void | clickOnText(Stringtext, intmatch, booleanscroll) | |
void | clickOnToggleButton(Stringname) | |
void | clickOnView(android.view.Viewview) | |
void | drag(floatfromX, floattoX, floatfromY, floattoY, intstepCount) | |
void | enterText(android.widget.EditTexteditText,Stringtext) | |
void | enterText(intindex,Stringtext) | |
void | finalize() | |
ArrayList<android.app.Activity> | getAllOpenedActivities() | |
android.widget.Button | getButton(intindex) | |
android.widget.Button | getButton(Stringtext) | |
android.app.Activity | getCurrentActivity() | |
ArrayList<android.widget.Button> | getCurrentButtons() | |
ArrayList<android.widget.CheckBox> | getCurrentCheckBoxes() | |
ArrayList<android.widget.DatePicker> | getCurrentDatePickers() | |
ArrayList<android.widget.EditText> | getCurrentEditTexts() | |
ArrayList<android.widget.GridView> | getCurrentGridViews() | |
ArrayList<android.widget.ImageButton> | getCurrentImageButtons() | |
ArrayList<android.widget.ImageView> | getCurrentImageViews() | |
ArrayList<android.widget.ListView> | getCurrentListViews() | |
ArrayList<android.widget.ProgressBar> | getCurrentProgressBars() | |
ArrayList<android.widget.RadioButton> | getCurrentRadioButtons() | |
ArrayList<android.widget.ScrollView> | getCurrentScrollViews() | |
ArrayList<android.widget.Spinner> | getCurrentSpinners() | |
ArrayList<android.widget.TextView> | getCurrentTextViews(android.view.Viewparent) | |
ArrayList<android.widget.TimePicker> | getCurrentTimePickers() | |
ArrayList<android.widget.ToggleButton> | getCurrentToggleButtons() | |
ArrayList<android.view.View> | getCurrentViews() | |
android.widget.EditText | getEditText(intindex) | |
android.widget.EditText | getEditText(Stringtext) | |
android.widget.ImageView | getImage(intindex) | |
android.widget.ImageButton | getImageButton(intindex) | |
String | getString(intresId) | |
android.widget.TextView | getText(intindex) | |
android.widget.TextView | getText(Stringtext) | |
android.view.View | getTopParent(android.view.Viewview) | |
android.view.View | getView(intid) | |
ArrayList<android.view.View> | getViews() | |
ArrayList<android.view.View> | getViews(android.view.Viewparent) | |
void | goBack() | |
void | goBackToActivity(Stringname) | |
boolean | isCheckBoxChecked(intindex) | |
boolean | isCheckBoxChecked(Stringtext) | |
boolean | isRadioButtonChecked(intindex) | |
boolean | isRadioButtonChecked(Stringtext) | |
boolean | isSpinnerTextSelected(intindex,Stringtext) | |
boolean | isSpinnerTextSelected(Stringtext) | |
boolean | isTextChecked(Stringtext) | |
boolean | isToggleButtonChecked(intindex) | |
boolean | isToggleButtonChecked(Stringtext) | |
void | pressMenuItem(intindex) | |
void | pressMenuItem(intindex, intitemsPerRow) | |
void | pressSpinnerItem(intspinnerIndex, intitemIndex) | |
boolean | scrollDown() | |
boolean | scrollDownList(intindex) | |
void | scrollToSide(intside) | |
boolean | scrollUp() | |
boolean | scrollUpList(intindex) | |
boolean | searchButton(Stringtext) | |
boolean | searchButton(Stringtext, booleanonlyVisible) | |
boolean | searchButton(Stringtext, intminimumNumberOfMatches) | |
boolean | searchButton(Stringtext, intminimumNumberOfMatches, booleanonlyVisible) | |
boolean | searchEditText(Stringtext) | |
boolean | searchText(Stringtext) | |
boolean | searchText(Stringtext, booleanonlyVisible) | |
boolean | searchText(Stringtext, intminimumNumberOfMatches) | |
boolean | searchText(Stringtext, intminimumNumberOfMatches, booleanscroll) | |
boolean | searchText(Stringtext, intminimumNumberOfMatches, booleanscroll, booleanonlyVisible) | |
boolean | searchToggleButton(Stringtext) | |
boolean | searchToggleButton(Stringtext, intminimumNumberOfMatches) | |
void | sendKey(intkey) | |
void | setActivityOrientation(intorientation) | |
void | setDatePicker(android.widget.DatePickerdatePicker, intyear, intmonthOfYear, intdayOfMonth) | |
void | setDatePicker(intindex, intyear, intmonthOfYear, intdayOfMonth) | |
void | setProgressBar(intindex, intprogress) | |
void | setProgressBar(android.widget.ProgressBarprogressBar, intprogress) | |
void | setTimePicker(intindex, inthour, intminute) | |
void | setTimePicker(android.widget.TimePickertimePicker, inthour, intminute) | |
void | sleep(inttime) | |
boolean | waitForActivity(Stringname, inttimeout) | |
boolean | waitForDialogToClose(longtimeout) | |
boolean | waitForText(Stringtext) | |
boolean | waitForText(Stringtext, intminimumNumberOfMatches, longtimeout) | |
boolean | waitForText(Stringtext, intminimumNumberOfMatches, longtimeout, booleanscroll) | |
| waitForView(Class<T>viewClass) | |
| waitForView(Class<T>viewClass, intminimumNumberOfMatches, inttimeout) | |
| waitForView(Class<T>viewClass, intminimumNumberOfMatches, inttimeout, booleanscroll) |
Methods inherited from class java.lang.Object |
clone,equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
LANDSCAPE
public static final intLANDSCAPE
See Also:
Constant Field Values
PORTRAIT
public static final intPORTRAIT
See Also:
Constant Field Values
RIGHT
public static final intRIGHT
See Also:
Constant Field Values
LEFT
public static final intLEFT
See Also:
Constant Field Values
UP
public static final intUP
See Also:
Constant Field Values
DOWN
public static final intDOWN
See Also:
Constant Field Values
ENTER
public static final intENTER
See Also:
Constant Field Values
MENU
public static final intMENU
See Also:
Constant Field Values
DELETE
public static final intDELETE
See Also:
Constant Field Values
Constructor Detail |
Solo
publicSolo(android.app.Instrumentationinst,
android.app.Activityactivity)
Constructor that takes in the instrumentation and the start activity.
Parameters:
inst - the Instrumentation instance
activity - the start Activity
Method Detail |
getViews
publicArrayList<android.view.View> getViews()
Returns an ArrayList of all the View objects located in the focused Activity or Dialog.
Returns:
an ArrayList of the View objects located in the focused window
getViews
publicArrayList<android.view.View> getViews(android.view.Viewparent)
Returns an ArrayList of the View objects contained in the parent View.
Parameters:
parent - the parent view from which to return the views
Returns:
an ArrayList of the View objects contained in the given View
getTopParent
public android.view.ViewgetTopParent(android.view.Viewview)
Returns the absolute top parent View for a given View.
Parameters:
view - the View whose top parent is requested
Returns:
the top parent View
clearEditText
public voidclearEditText(intindex)
Clears the value of an EditText.
Parameters:
index - the index of the EditText that should be cleared. 0 if only one is available
clearEditText
public voidclearEditText(android.widget.EditTexteditText)
Clears the value of an EditText.
Parameters:
editText - the EditText that should be cleared
waitForText
public booleanwaitForText(Stringtext)
Waits for a text to be shown. Default timeout is 20 seconds.
Parameters:
text - the text to wait for
Returns:
true if text is shown and false if it is not shown before the timeout
waitForText
public booleanwaitForText(Stringtext,
intminimumNumberOfMatches,
longtimeout)
Waits for a text to be shown.
Parameters:
text - the text to wait for
minimumNumberOfMatches - the minimum number of matches that are expected to be shown. 0 means any number of matches
timeout - the the amount of time in milliseconds to wait
Returns:
true if text is shown and false if it is not shown before the timeout
waitForText
public booleanwaitForText(Stringtext,
intminimumNumberOfMatches,
longtimeout,
booleanscroll)
Waits for a text to be shown.
Parameters:
text - the text to wait for
minimumNumberOfMatches - the minimum number of matches that are expected to be shown. 0 means any number of matches
timeout - the the amount of time in milliseconds to wait
scroll - true if scrolling should be performed
Returns:
true if text is shown and false if it is not shown before the timeout
waitForView
public <T extends android.view.View> booleanwaitForView(Class<T>viewClass)
Waits for a View to be shown. Default timeout is 20 seconds.
Parameters:
viewClass - the View class to wait for
waitForView
public <T extends android.view.View> booleanwaitForView(Class<T>viewClass,
intminimumNumberOfMatches,
inttimeout)
Waits for a View to be shown.
Parameters:
viewClass - the View class to wait for
minimumNumberOfMatches - the minimum number of matches that are expected to be shown. 0 means any number of matches
timeout - the amount of time in milliseconds to wait
Returns:
true if view is shown and false if it is not shown before the timeout
waitForView
public <T extends android.view.View> booleanwaitForView(Class<T>viewClass,
intminimumNumberOfMatches,
inttimeout,
booleanscroll)
Waits for a View to be shown.
Parameters:
viewClass - the View class to wait for
minimumNumberOfMatches - the minimum number of matches that are expected to be shown. 0 means any number of matches
timeout - the amount of time in milliseconds to wait
scroll - true if scrolling should be performed
Returns:
true if the View is shown and false if it is not shown before the timeout
searchEditText
public booleansearchEditText(Stringtext)
Searches for a text string in the EditText objects currently shown and returns true if found. Will automatically scroll when needed.
Parameters:
text - the text to search for
Returns:
true if an EditText with the given text is found or false if it is not found
searchButton
public booleansearchButton(Stringtext)
Searches for a Button with the given text string and returns true if at least one Button is found. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
Returns:
true if a Button with the given text is found and false if it is not found
searchButton
public booleansearchButton(Stringtext,
booleanonlyVisible)
Searches for a Button with the given text string and returns true if at least one Button is found. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
onlyVisible - true if only Button visible on the screen should be searched
Returns:
true if a Button with the given text is found and false if it is not found
searchToggleButton
public booleansearchToggleButton(Stringtext)
Searches for a ToggleButton with the given text string and returns true if at least one ToggleButton is found. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
Returns:
true if a ToggleButton with the given text is found and false if it is not found
searchButton
public booleansearchButton(Stringtext,
intminimumNumberOfMatches)
Searches for a Button with the given text string and returns true if the searched Button is found a given number of times. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
Returns:
true if a Button with the given text is found a given number of times and false if it is not found
searchButton
public booleansearchButton(Stringtext,
intminimumNumberOfMatches,
booleanonlyVisible)
Searches for a Button with the given text string and returns true if the searched Button is found a given number of times. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
onlyVisible - true if only Button visible on the screen should be searched
Returns:
true if a Button with the given text is found a given number of times and false if it is not found
searchToggleButton
public booleansearchToggleButton(Stringtext,
intminimumNumberOfMatches)
Searches for a ToggleButton with the given text string and returns true if the searched ToggleButton is found a given number of times. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
Returns:
true if a ToggleButton with the given text is found a given number of times and false if it is not found
searchText
public booleansearchText(Stringtext)
Searches for a text string and returns true if at least one item is found with the expected text. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
Returns:
true if the search string is found and false if it is not found
searchText
public booleansearchText(Stringtext,
booleanonlyVisible)
Searches for a text string and returns true if at least one item is found with the expected text. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
onlyVisible - true if only texts visible on the screen should be searched
Returns:
true if the search string is found and false if it is not found
searchText
public booleansearchText(Stringtext,
intminimumNumberOfMatches)
Searches for a text string and returns true if the searched text is found a given number of times. Will automatically scroll when needed.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
Returns:
true if text string is found a given number of times and false if the text string is not found
searchText
public booleansearchText(Stringtext,
intminimumNumberOfMatches,
booleanscroll)
Searches for a text string and returns true if the searched text is found a given number of times.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression.
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
scroll - true if scrolling should be performed
Returns:
true if text string is found a given number of times and false if the text string is not found
searchText
public booleansearchText(Stringtext,
intminimumNumberOfMatches,
booleanscroll,
booleanonlyVisible)
Searches for a text string and returns true if the searched text is found a given number of times.
Parameters:
text - the text to search for. The parameter will be interpreted as a regular expression.
minimumNumberOfMatches - the minimum number of matches expected to be found. 0 matches means that one or more matches are expected to be found
scroll - true if scrolling should be performed
onlyVisible - true if only texts visible on the screen should be searched
Returns:
true if text string is found a given number of times and false if the text string is not found
setActivityOrientation
public voidsetActivityOrientation(intorientation)
Sets the Orientation (Landscape/Portrait) for the current activity.
Parameters:
orientation - the orientation to be set. Solo.LANDSCAPE for landscape or Solo.PORTRAIT for portrait.
getAllOpenedActivities
publicArrayList<android.app.Activity> getAllOpenedActivities()
Returns an ArrayList of all the opened/active activities.
Returns:
an ArrayList of all the opened/active activities
getCurrentActivity
public android.app.ActivitygetCurrentActivity()
Returns the current Activity.
Returns:
the current Activity
assertCurrentActivity
public voidassertCurrentActivity(Stringmessage,
Stringname)
Asserts that the expected Activity is the currently active one.
Parameters:
message - the message that should be displayed if the assert fails
name - the name of the Activity that is expected to be active e.g. "MyActivity"
assertCurrentActivity
public voidassertCurrentActivity(Stringmessage,
ClassexpectedClass)
Asserts that the expected Activity is the currently active one.
Parameters:
message - the message that should be displayed if the assert fails
expectedClass - the Class object that is expected to be active e.g. MyActivity.class
assertCurrentActivity
public voidassertCurrentActivity(Stringmessage,
Stringname,
booleanisNewInstance)
Asserts that the expected Activity is the currently active one, with the possibility to verify that the expected Activity is a new instance of the Activity.
Parameters:
message - the message that should be displayed if the assert fails
name - the name of the activity that is expected to be active e.g. "MyActivity"
isNewInstance - true if the expected Activity is a new instance of the Activity
assertCurrentActivity
public voidassertCurrentActivity(Stringmessage,
ClassexpectedClass,
booleanisNewInstance)
Asserts that the expected Activity is the currently active one, with the possibility to verify that the expected Activity is a new instance of the Activity.
Parameters:
message - the message that should be displayed if the assert fails
expectedClass - the Class object that is expected to be active e.g. MyActivity.class
isNewInstance - true if the expected Activity is a new instance of the Activity
assertMemoryNotLow
public voidassertMemoryNotLow()
Asserts that the available memory in the system is not low.
waitForDialogToClose
public booleanwaitForDialogToClose(longtimeout)
Waits for a Dialog to close.
Parameters:
timeout - the amount of time in milliseconds to wait
Returns:
true if the Dialog is closed before the timeout and false if it is not closed
goBack
public voidgoBack()
Simulates pressing the hardware back key.
clickOnScreen
public voidclickOnScreen(floatx,
floaty)
Clicks on a given coordinate on the screen.
Parameters:
x - the x coordinate
y - the y coordinate
clickLongOnScreen
public voidclickLongOnScreen(floatx,
floaty)
Long clicks a given coordinate on the screen.
Parameters:
x - the x coordinate
y - the y coordinate
clickLongOnScreen
public voidclickLongOnScreen(floatx,
floaty,
inttime)
Long clicks a given coordinate on the screen for a given amount of time.
Parameters:
x - the x coordinate
y - the y coordinate
time - the amount of time to long click
clickOnButton
public voidclickOnButton(Stringname)
Clicks on a Button with a given text. Will automatically scroll when needed.
Parameters:
name - the name of the Button presented to the user. The parameter will be interpreted as a regular expression
clickOnImageButton
public voidclickOnImageButton(intindex)
Clicks on an ImageButton with a given index.
Parameters:
index - the index of the ImageButton to be clicked. 0 if only one is available
clickOnToggleButton
public voidclickOnToggleButton(Stringname)
Clicks on a ToggleButton with a given text.
Parameters:
name - the name of the ToggleButton presented to the user. The parameter will be interpreted as a regular expression
clickOnMenuItem
public voidclickOnMenuItem(Stringtext)
Clicks on a MenuItem with a given text.
Parameters:
text - the menu text that should be clicked on. The parameter will be interpreted as a regular expression
clickOnMenuItem
public voidclickOnMenuItem(Stringtext,
booleansubMenu)
Clicks on a MenuItem with a given text.
Parameters:
text - the menu text that should be clicked on. The parameter will be interpreted as a regular expression
subMenu - true if the menu item could be located in a sub menu
pressMenuItem
public voidpressMenuItem(intindex)
Presses a MenuItem with a given index. Index 0 is the first item in the first row, Index 3 is the first item in the second row and index 6 is the first item in the third row.
Parameters:
index - the index of the MenuItem to be pressed
pressMenuItem
public voidpressMenuItem(intindex,
intitemsPerRow)
Presses a MenuItem with a given index. Supports three rows with a given amount of items. If itemsPerRow equals 5 then index 0 is the first item in the first row, index 5 is the first item in the second row and index 10 is the first item in the third row.
Parameters:
index - the index of the MenuItem to be pressed
itemsPerRow - the amount of menu items there are per row.
pressSpinnerItem
public voidpressSpinnerItem(intspinnerIndex,
intitemIndex)
Presses on a Spinner (drop-down menu) item.
Parameters:
spinnerIndex - the index of the Spinner menu to be used
itemIndex - the index of the Spinner item to be pressed relative to the currently selected item A Negative number moves up on the Spinner, positive moves down
clickOnView
public voidclickOnView(android.view.Viewview)
Clicks on a given View.
Parameters:
view - the View that should be clicked
clickLongOnView
public voidclickLongOnView(android.view.Viewview)
Long clicks on a given View.
Parameters:
view - the View that should be long clicked
clickLongOnView
public voidclickLongOnView(android.view.Viewview,
inttime)
Long clicks on a given View for a given amount of time.
Parameters:
view - the View that should be long clicked
time - the amount of time to long click
clickOnText
public voidclickOnText(Stringtext)
Clicks on a View displaying a given text. Will automatically scroll when needed.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
clickOnText
public voidclickOnText(Stringtext,
intmatch)
Clicks on a View displaying a given text. Will automatically scroll when needed.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
match - the match of the text that should be clicked
clickOnText
public voidclickOnText(Stringtext,
intmatch,
booleanscroll)
Clicks on a View displaying a given text.
Parameters:
text - the text that should be clicked on. The parameter will be interpreted as a regular expression
match - the match of the text that should be clicked
scroll - true if scrolling should be performed
clickLongOnText
public voidclickLongOnText(Stringtext)
Long clicks on a given View. Will automatically scroll when needed.clickOnText(String) can then be used to click on the context menu items that appear after the long click.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
clickLongOnText
public voidclickLongOnText(Stringtext,
intmatch)
Long clicks on a given View. Will automatically scroll when needed.clickOnText(String) can then be used to click on the context menu items that appear after the long click.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
match - the match of the text that should be clicked
clickLongOnText
public voidclickLongOnText(Stringtext,
intmatch,
booleanscroll)
Long clicks on a given View.clickOnText(String) can then be used to click on the context menu items that appear after the long click.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
match - the match of the text that should be clicked
scroll - true if scrolling should be performed
clickLongOnText
public voidclickLongOnText(Stringtext,
intmatch,
inttime)
Long clicks on a given View.clickOnText(String) can then be used to click on the context menu items that appear after the long click.
Parameters:
text - the text that should be clicked. The parameter will be interpreted as a regular expression
match - the match of the text that should be clicked
time - the amount of time to long click
clickLongOnTextAndPress
public voidclickLongOnTextAndPress(Stringtext,
intindex)
Long clicks on a given View and then selects an item from the context menu that appears. Will automatically scroll when needed.
Parameters:
text - the text to be clicked. The parameter will be interpreted as a regular expression
index - the index of the menu item to be pressed. 0 if only one is available
clickOnButton
public voidclickOnButton(intindex)
Clicks on a Button with a given index.
Parameters:
index - the index of the Button to be clicked. 0 if only one is available
clickOnRadioButton
public voidclickOnRadioButton(intindex)
Clicks on a RadioButton with a given index.
Parameters:
index - the index of the RadioButton to be clicked. 0 if only one is available
clickOnCheckBox
public voidclickOnCheckBox(intindex)
Clicks on a CheckBox with a given index.
Parameters:
index - the index of the CheckBox to be clicked. 0 if only one is available
clickOnEditText
public voidclickOnEditText(intindex)
Clicks on an EditText with a given index.
Parameters:
index - the index of the EditText to be clicked. 0 if only one is available
clickInList
publicArrayList<android.widget.TextView> clickInList(intline)
Clicks on a given list line and returns an ArrayList of the TextView objects that the list line is showing. Will use the first list it finds.
Parameters:
line - the line that should be clicked
Returns:
an ArrayList of the TextView objects located in the list line
clickInList
publicArrayList<android.widget.TextView> clickInList(intline,
intindex)
Clicks on a given list line on a specified list and returns an ArrayList of the TextView objects that the list line is showing.
Parameters:
line - the line that should be clicked
index - the index of the list. 1 if two lists are available
Returns:
an ArrayList of the TextView objects located in the list line
drag
public voiddrag(floatfromX,
floattoX,
floatfromY,
floattoY,
intstepCount)
Simulate touching a given location and dragging it to a new location. This method was copied from TouchUtils.java in the Android Open Source Project, and modified here.
Parameters:
fromX - X coordinate of the initial touch, in screen coordinates
toX - X coordinate of the drag destination, in screen coordinates
fromY - X coordinate of the initial touch, in screen coordinates
toY - Y coordinate of the drag destination, in screen coordinates
stepCount - How many move steps to include in the drag
scrollDown
public booleanscrollDown()
Scrolls down the screen.
Returns:
true if more scrolling can be done and false if it is at the end of the screen
scrollUp
public booleanscrollUp()
Scrolls up the screen.
Returns:
true if more scrolling can be done and false if it is at the top of the screen
scrollDownList
public booleanscrollDownList(intindex)
Scrolls down a list with a given index.
Parameters:
index - the ListView to be scrolled. 0 if only one list is available
Returns:
true if more scrolling can be done
scrollUpList
public booleanscrollUpList(intindex)
Scrolls up a list with a given index.
Parameters:
index - the ListView to be scrolled. 0 if only one list is available
Returns:
true if more scrolling can be done
scrollToSide
public voidscrollToSide(intside)
Scrolls horizontally.
Parameters:
side - the side to which to scroll;RIGHT or LEFT
setDatePicker
public voidsetDatePicker(intindex,
intyear,
intmonthOfYear,
intdayOfMonth)
Sets the date in a DatePicker with a given index.
Parameters:
index - the index of the DatePicker. 0 if only one is available
year - the year e.g. 2011
monthOfYear - the month e.g. 03
dayOfMonth - the day e.g. 10
setDatePicker
public voidsetDatePicker(android.widget.DatePickerdatePicker,
intyear,
intmonthOfYear,
intdayOfMonth)
Sets the date in a given DatePicker.
Parameters:
datePicker - the DatePicker object.
year - the year e.g. 2011
monthOfYear - the month e.g. 03
dayOfMonth - the day e.g. 10
setTimePicker
public voidsetTimePicker(intindex,
inthour,
intminute)
Sets the time in a TimePicker with a given index.
Parameters:
index - the index of the TimePicker. 0 if only one is available
hour - the hour e.g. 15
minute - the minute e.g. 30
setTimePicker
public voidsetTimePicker(android.widget.TimePickertimePicker,
inthour,
intminute)
Sets the time in a given TimePicker.
Parameters:
timePicker - the TimePicker object.
hour - the hour e.g. 15
minute - the minute e.g. 30
setProgressBar
public voidsetProgressBar(intindex,
intprogress)
Sets the progress of a ProgressBar with a given index. Examples are SeekBar and RatingBar.
Parameters:
index - the index of the ProgressBar
progress - the progress that the ProgressBar should be set to
setProgressBar
public voidsetProgressBar(android.widget.ProgressBarprogressBar,
intprogress)
Sets the progress of a given ProgressBar. Examples are SeekBar and RatingBar.
Parameters:
progressBar - the ProgressBar
progress - the progress that the ProgressBar should be set to
enterText
public voidenterText(intindex,
Stringtext)
Enters text into an EditText with a given index.
Parameters:
index - the index of the EditText. 0 if only one is available
text - the text string to enter into the EditText field
enterText
public voidenterText(android.widget.EditTexteditText,
Stringtext)
Enters text into a given EditText.
Parameters:
editText - the EditText to enter text into
text - the text string to enter into the EditText field
clickOnImage
public voidclickOnImage(intindex)
Clicks on an ImageView with a given index.
Parameters:
index - the index of the ImageView to be clicked. 0 if only one is available
getEditText
public android.widget.EditTextgetEditText(intindex)
Returns an EditText with a given index.
Parameters:
index - the index of the EditText. 0 if only one is available
Returns:
the EditText with a specified index or null if index is invalid
getButton
public android.widget.ButtongetButton(intindex)
Returns a Button with a given index.
Parameters:
index - the index of the Button. 0 if only one is available
Returns:
the Button with a specified index or null if index is invalid
getText
public android.widget.TextViewgetText(intindex)
Returns a TextView with a given index.
Parameters:
index - the index of the TextView. 0 if only one is available
Returns:
the TextView with a specified index or null if index is invalid
getImage
public android.widget.ImageViewgetImage(intindex)
Returns an ImageView with a given index.
Parameters:
index - the index of the ImageView. 0 if only one is available
Returns:
the ImageView with a specified index or null if index is invalid
getImageButton
public android.widget.ImageButtongetImageButton(intindex)
Returns an ImageButton with a given index.
Parameters:
index - the index of the ImageButton. 0 if only one is available
Returns:
the ImageButton with a specified index or null if index is invalid
getText
public android.widget.TextViewgetText(Stringtext)
Returns a TextView which shows a given text.
Parameters:
text - the text that is shown
Returns:
the TextView that shows the given text
getButton
public android.widget.ButtongetButton(Stringtext)
Returns a Button which shows a given text.
Parameters:
text - the text that is shown
Returns:
the Button that shows the given text
getEditText
public android.widget.EditTextgetEditText(Stringtext)
Returns an EditText which shows a given text.
Parameters:
text - the text that is shown
Returns:
the EditText which shows the given text
getView
public android.view.ViewgetView(intid)
Returns a View with a given id.
Parameters:
id - the R.id of the View to be returned
Returns:
a View with a given id
getCurrentViews
publicArrayList<android.view.View> getCurrentViews()
Returns an ArrayList of the View objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the View objects currently shown in the focused window
getCurrentImageViews
publicArrayList<android.widget.ImageView> getCurrentImageViews()
Returns an ArrayList of the ImageView objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ImageView objects currently shown in the focused window
getCurrentEditTexts
publicArrayList<android.widget.EditText> getCurrentEditTexts()
Returns an ArrayList of the EditText objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the EditText objects currently shown in the focused window
getCurrentListViews
publicArrayList<android.widget.ListView> getCurrentListViews()
Returns an ArrayList of the ListView objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ListView objects currently shown in the focused window
getCurrentScrollViews
publicArrayList<android.widget.ScrollView> getCurrentScrollViews()
Returns an ArrayList of the ScrollView objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ScrollView objects currently shown in the focused window
getCurrentSpinners
publicArrayList<android.widget.Spinner> getCurrentSpinners()
Returns an ArrayList of the Spinner objects (drop-down menus) currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the Spinner objects (drop-down menus) currently shown in the focused window
getCurrentTextViews
publicArrayList<android.widget.TextView> getCurrentTextViews(android.view.Viewparent)
Returns an ArrayList of the TextView objects currently shown in the focused Activity or Dialog.
Parameters:
parent - the parent View from which the TextView objects should be returned. null if all TextView objects from the currently focused window e.g. Activity should be returned
Returns:
an ArrayList of the TextView objects currently shown in the focused window
getCurrentGridViews
publicArrayList<android.widget.GridView> getCurrentGridViews()
Returns an ArrayList of the GridView objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the GridView objects currently shown in the focused window
getCurrentButtons
publicArrayList<android.widget.Button> getCurrentButtons()
Returns an ArrayList of the Button objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the Button objects currently shown in the focused window
getCurrentToggleButtons
publicArrayList<android.widget.ToggleButton> getCurrentToggleButtons()
Returns an ArrayList of the ToggleButton objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ToggleButton objects currently shown in the focused window
getCurrentRadioButtons
publicArrayList<android.widget.RadioButton> getCurrentRadioButtons()
Returns an ArrayList of the RadioButton objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the RadioButton objects currently shown in the focused window
getCurrentCheckBoxes
publicArrayList<android.widget.CheckBox> getCurrentCheckBoxes()
Returns an ArrayList of the CheckBox objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the CheckBox objects currently shown in the focused window
getCurrentImageButtons
publicArrayList<android.widget.ImageButton> getCurrentImageButtons()
Returns an ArrayList of the ImageButton objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ImageButton objects currently shown in the focused window
getCurrentDatePickers
publicArrayList<android.widget.DatePicker> getCurrentDatePickers()
Returns an ArrayList of the DatePicker objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the DatePicker objects currently shown in the focused window
getCurrentTimePickers
publicArrayList<android.widget.TimePicker> getCurrentTimePickers()
Returns an ArrayList of the TimePicker objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the TimePicker objects currently shown in the focused window
getCurrentProgressBars
publicArrayList<android.widget.ProgressBar> getCurrentProgressBars()
Returns an ArrayList of the ProgressBar objects currently shown in the focused Activity or Dialog.
Returns:
an ArrayList of the ProgressBar objects currently shown in the focused window
isRadioButtonChecked
public booleanisRadioButtonChecked(intindex)
Checks if a RadioButton with a given index is checked.
Parameters:
index - of the RadioButton to check. 0 if only one is available
Returns:
true if RadioButton is checked and false if it is not checked
isRadioButtonChecked
public booleanisRadioButtonChecked(Stringtext)
Checks if a RadioButton with a given text is checked.
Parameters:
text - the text that the RadioButton shows
Returns:
true if a RadioButton with the given text is checked and false if it is not checked
isCheckBoxChecked
public booleanisCheckBoxChecked(intindex)
Checks if a CheckBox with a given index is checked.
Parameters:
index - of the CheckBox to check. 0 if only one is available
Returns:
true if CheckBox is checked and false if it is not checked
isToggleButtonChecked
public booleanisToggleButtonChecked(Stringtext)
Checks if a ToggleButton with a given text is checked.
Parameters:
text - the text that the ToggleButton shows
Returns:
true if a ToggleButton with the given text is checked and false if it is not checked
isToggleButtonChecked
public booleanisToggleButtonChecked(intindex)
Checks if a ToggleButton with a given index is checked.
Parameters:
index - of the ToggleButton to check. 0 if only one is available
Returns:
true if ToggleButton is checked and false if it is not checked
isCheckBoxChecked
public booleanisCheckBoxChecked(Stringtext)
Checks if a CheckBox with a given text is checked.
Parameters:
text - the text that the CheckBox shows
Returns:
true if a CheckBox with the given text is checked and false if it is not checked
isTextChecked
public booleanisTextChecked(Stringtext)
Checks if the given text is checked.
Parameters:
text - the text that the CheckedTextView or CompoundButton objects show
Returns:
true if the given text is checked and false if it is not checked
isSpinnerTextSelected
public booleanisSpinnerTextSelected(Stringtext)
Checks if a given text is selected in any Spinner located in the current screen.
Parameters:
text - the text that is expected to be selected
Returns:
true if the given text is selected in any Spinner and false if it is not
isSpinnerTextSelected
public booleanisSpinnerTextSelected(intindex,
Stringtext)
Checks if a given text is selected in a given Spinner.
Parameters:
index - the index of the spinner to check. 0 if only one spinner is available
text - the text that is expected to be selected
Returns:
true if the given text is selected in the given Spinner and false if it is not
sendKey
public voidsendKey(intkey)
Sends a key: Right, Left, Up, Down, Enter, Menu or Delete.
Parameters:
key - the key to be sent. Use Solo.RIGHT,LEFT, UP, DOWN, ENTER, MENU, DELETE
goBackToActivity
public voidgoBackToActivity(Stringname)
Returns to the given Activity.
Parameters:
name - the name of the Activity to return to, e.g. "MyActivity"
waitForActivity
public booleanwaitForActivity(Stringname,
inttimeout)
Waits for the given Activity.
Parameters:
name - the name of the Activity to wait for e.g. "MyActivity"
timeout - the amount of time in milliseconds to wait
Returns:
true if Activity appears before the timeout and false if it does not
getString
publicString getString(intresId)
Returns a localized string.
Parameters:
resId - the resource ID for the string
Returns:
the localized string
sleep
public voidsleep(inttime)
Robotium will sleep for a specified time.
Parameters:
time - the time in milliseconds that Robotium should sleep
finalize
public voidfinalize()
throws Throwable
All activites that have been active are finished.
Overrides:
finalize in classObject
Throws:
Throwable
|
| ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY:NESTED|FIELD|CONSTR|METHOD | DETAIL:FIELD|CONSTR|METHOD |
Copyright © 2009-2011. All Rights Reserved.
|
| ||||||||
PREV NEXT | FRAMES NO FRAMES All Classes All Classes | ||||||||
AC D E F G I L M P R S U W
A
assertCurrentActivity(String, String) - Method in class com.jayway.android.robotium.solo.Solo
Asserts that the expected Activity is the currently active one.
assertCurrentActivity(String, Class) - Method in class com.jayway.android.robotium.solo.Solo
Asserts that the expected Activity is the currently active one.
assertCurrentActivity(String, String, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Asserts that the expected Activity is the currently active one, with the possibility to verify that the expected Activity is a new instance of the Activity.
assertCurrentActivity(String, Class, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Asserts that the expected Activity is the currently active one, with the possibility to verify that the expected Activity is a new instance of the Activity.
assertMemoryNotLow() - Method in class com.jayway.android.robotium.solo.Solo
Asserts that the available memory in the system is not low.
C
clearEditText(int) - Method in class com.jayway.android.robotium.solo.Solo
Clears the value of an EditText.
clearEditText(EditText) - Method in class com.jayway.android.robotium.solo.Solo
Clears the value of an EditText.
clickInList(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a given list line and returns an ArrayList of the TextView objects that the list line is showing.
clickInList(int, int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a given list line on a specified list and returns an ArrayList of the TextView objects that the list line is showing.
clickLongOnScreen(float, float) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks a given coordinate on the screen.
clickLongOnScreen(float, float, int) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks a given coordinate on the screen for a given amount of time.
clickLongOnText(String) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View.
clickLongOnText(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View.
clickLongOnText(String, int, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View.
clickLongOnText(String, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View.
clickLongOnTextAndPress(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View and then selects an item from the context menu that appears.
clickLongOnView(View) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View.
clickLongOnView(View, int) - Method in class com.jayway.android.robotium.solo.Solo
Long clicks on a given View for a given amount of time.
clickOnButton(String) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a Button with a given text.
clickOnButton(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a Button with a given index.
clickOnCheckBox(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a CheckBox with a given index.
clickOnEditText(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on an EditText with a given index.
clickOnImage(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on an ImageView with a given index.
clickOnImageButton(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on an ImageButton with a given index.
clickOnMenuItem(String) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a MenuItem with a given text.
clickOnMenuItem(String, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a MenuItem with a given text.
clickOnRadioButton(int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a RadioButton with a given index.
clickOnScreen(float, float) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a given coordinate on the screen.
clickOnText(String) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a View displaying a given text.
clickOnText(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a View displaying a given text.
clickOnText(String, int, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a View displaying a given text.
clickOnToggleButton(String) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a ToggleButton with a given text.
clickOnView(View) - Method in class com.jayway.android.robotium.solo.Solo
Clicks on a given View.
com.jayway.android.robotium.solo - package com.jayway.android.robotium.solo
D
DELETE - Static variable in class com.jayway.android.robotium.solo.Solo
DOWN - Static variable in class com.jayway.android.robotium.solo.Solo
drag(float, float, float, float, int) - Method in class com.jayway.android.robotium.solo.Solo
Simulate touching a given location and dragging it to a new location.
E
ENTER - Static variable in class com.jayway.android.robotium.solo.Solo
enterText(int, String) - Method in class com.jayway.android.robotium.solo.Solo
Enters text into an EditText with a given index.
enterText(EditText, String) - Method in class com.jayway.android.robotium.solo.Solo
Enters text into a given EditText.
F
finalize() - Method in class com.jayway.android.robotium.solo.Solo
All activites that have been active are finished.
G
getAllOpenedActivities() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of all the opened/active activities.
getButton(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns a Button with a given index.
getButton(String) - Method in class com.jayway.android.robotium.solo.Solo
Returns a Button which shows a given text.
getCurrentActivity() - Method in class com.jayway.android.robotium.solo.Solo
Returns the current Activity.
getCurrentButtons() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the Button objects currently shown in the focused Activity or Dialog.
getCurrentCheckBoxes() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the CheckBox objects currently shown in the focused Activity or Dialog.
getCurrentDatePickers() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the DatePicker objects currently shown in the focused Activity or Dialog.
getCurrentEditTexts() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the EditText objects currently shown in the focused Activity or Dialog.
getCurrentGridViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the GridView objects currently shown in the focused Activity or Dialog.
getCurrentImageButtons() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ImageButton objects currently shown in the focused Activity or Dialog.
getCurrentImageViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ImageView objects currently shown in the focused Activity or Dialog.
getCurrentListViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ListView objects currently shown in the focused Activity or Dialog.
getCurrentProgressBars() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ProgressBar objects currently shown in the focused Activity or Dialog.
getCurrentRadioButtons() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the RadioButton objects currently shown in the focused Activity or Dialog.
getCurrentScrollViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ScrollView objects currently shown in the focused Activity or Dialog.
getCurrentSpinners() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the Spinner objects (drop-down menus) currently shown in the focused Activity or Dialog.
getCurrentTextViews(View) - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the TextView objects currently shown in the focused Activity or Dialog.
getCurrentTimePickers() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the TimePicker objects currently shown in the focused Activity or Dialog.
getCurrentToggleButtons() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the ToggleButton objects currently shown in the focused Activity or Dialog.
getCurrentViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the View objects currently shown in the focused Activity or Dialog.
getEditText(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns an EditText with a given index.
getEditText(String) - Method in class com.jayway.android.robotium.solo.Solo
Returns an EditText which shows a given text.
getImage(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns an ImageView with a given index.
getImageButton(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns an ImageButton with a given index.
getString(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns a localized string.
getText(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns a TextView with a given index.
getText(String) - Method in class com.jayway.android.robotium.solo.Solo
Returns a TextView which shows a given text.
getTopParent(View) - Method in class com.jayway.android.robotium.solo.Solo
Returns the absolute top parent View for a given View.
getView(int) - Method in class com.jayway.android.robotium.solo.Solo
Returns a View with a given id.
getViews() - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of all the View objects located in the focused Activity or Dialog.
getViews(View) - Method in class com.jayway.android.robotium.solo.Solo
Returns an ArrayList of the View objects contained in the parent View.
goBack() - Method in class com.jayway.android.robotium.solo.Solo
Simulates pressing the hardware back key.
goBackToActivity(String) - Method in class com.jayway.android.robotium.solo.Solo
Returns to the given Activity.
I
isCheckBoxChecked(int) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a CheckBox with a given index is checked.
isCheckBoxChecked(String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a CheckBox with a given text is checked.
isRadioButtonChecked(int) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a RadioButton with a given index is checked.
isRadioButtonChecked(String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a RadioButton with a given text is checked.
isSpinnerTextSelected(String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a given text is selected in any Spinner located in the current screen.
isSpinnerTextSelected(int, String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a given text is selected in a given Spinner.
isTextChecked(String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if the given text is checked.
isToggleButtonChecked(String) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a ToggleButton with a given text is checked.
isToggleButtonChecked(int) - Method in class com.jayway.android.robotium.solo.Solo
Checks if a ToggleButton with a given index is checked.
L
LANDSCAPE - Static variable in class com.jayway.android.robotium.solo.Solo
LEFT - Static variable in class com.jayway.android.robotium.solo.Solo
M
MENU - Static variable in class com.jayway.android.robotium.solo.Solo
P
PORTRAIT - Static variable in class com.jayway.android.robotium.solo.Solo
pressMenuItem(int) - Method in class com.jayway.android.robotium.solo.Solo
Presses a MenuItem with a given index.
pressMenuItem(int, int) - Method in class com.jayway.android.robotium.solo.Solo
Presses a MenuItem with a given index.
pressSpinnerItem(int, int) - Method in class com.jayway.android.robotium.solo.Solo
Presses on a Spinner (drop-down menu) item.
R
RIGHT - Static variable in class com.jayway.android.robotium.solo.Solo
S
scrollDown() - Method in class com.jayway.android.robotium.solo.Solo
Scrolls down the screen.
scrollDownList(int) - Method in class com.jayway.android.robotium.solo.Solo
Scrolls down a list with a given index.
scrollToSide(int) - Method in class com.jayway.android.robotium.solo.Solo
Scrolls horizontally.
scrollUp() - Method in class com.jayway.android.robotium.solo.Solo
Scrolls up the screen.
scrollUpList(int) - Method in class com.jayway.android.robotium.solo.Solo
Scrolls up a list with a given index.
searchButton(String) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a Button with the given text string and returns true if at least one Button is found.
searchButton(String, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a Button with the given text string and returns true if at least one Button is found.
searchButton(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a Button with the given text string and returns true if the searched Button is found a given number of times.
searchButton(String, int, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a Button with the given text string and returns true if the searched Button is found a given number of times.
searchEditText(String) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string in the EditText objects currently shown and returns true if found.
searchText(String) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string and returns true if at least one item is found with the expected text.
searchText(String, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string and returns true if at least one item is found with the expected text.
searchText(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string and returns true if the searched text is found a given number of times.
searchText(String, int, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string and returns true if the searched text is found a given number of times.
searchText(String, int, boolean, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a text string and returns true if the searched text is found a given number of times.
searchToggleButton(String) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a ToggleButton with the given text string and returns true if at least one ToggleButton is found.
searchToggleButton(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Searches for a ToggleButton with the given text string and returns true if the searched ToggleButton is found a given number of times.
sendKey(int) - Method in class com.jayway.android.robotium.solo.Solo
Sends a key: Right, Left, Up, Down, Enter, Menu or Delete.
setActivityOrientation(int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the Orientation (Landscape/Portrait) for the current activity.
setDatePicker(int, int, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the date in a DatePicker with a given index.
setDatePicker(DatePicker, int, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the date in a given DatePicker.
setProgressBar(int, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the progress of a ProgressBar with a given index.
setProgressBar(ProgressBar, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the progress of a given ProgressBar.
setTimePicker(int, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the time in a TimePicker with a given index.
setTimePicker(TimePicker, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Sets the time in a given TimePicker.
sleep(int) - Method in class com.jayway.android.robotium.solo.Solo
Robotium will sleep for a specified time.
Solo - Class in com.jayway.android.robotium.solo
This class contains all the methods that the sub-classes have.
Solo(Instrumentation, Activity) - Constructor for class com.jayway.android.robotium.solo.Solo
Constructor that takes in the instrumentation and the start activity.
U
UP - Static variable in class com.jayway.android.robotium.solo.Solo
W
waitForActivity(String, int) - Method in class com.jayway.android.robotium.solo.Solo
Waits for the given Activity.
waitForDialogToClose(long) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a Dialog to close.
waitForText(String) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a text to be shown.
waitForText(String, int, long) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a text to be shown.
waitForText(String, int, long, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a text to be shown.
waitForView(Class<T>) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a View to be shown.
waitForView(Class<T>, int, int) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a View to be shown.
waitForView(Class<T>, int, int, boolean) - Method in class com.jayway.android.robotium.solo.Solo
Waits for a View to be shown.
AC D E F G I L M P R S U W
|
| ||||||||
PREV NEXT | FRAMES NO FRAMES All Classes All Classes | ||||||||
Copyright © 2009-2011. All Rights Reserved.
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer