1. waitForText(String text)
* Waits for a text to be shown. Default timeout is 20 seconds.
* @param text the text to wait for, specified as a regular expression
* @return {@code true} if text is shown and {@code false} if it is not shown before the timeout
2. waitForText(String text, int minimumNumberOfMatches, long timeout)
* Waits for a text to be shown.
* @param text the text to wait for, specified as a regular expression
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the the amount of time in milliseconds to wait
* @return {@code true} if text is shown and {@code false} if it is not shown before the timeout
3.waitForText(String text, int minimumNumberOfMatches, long timeout, boolean scroll)
* Waits for a text to be shown.
* @param text the text to wait for, specified as a regular expression
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if text is shown and {@code false} if it is not shown before the timeout
4. waitForText(String text, int minimumNumberOfMatches, long timeout, boolean scroll, boolean onlyVisible)
* Waits for a text to be shown.
* @param text the text to wait for, specified as a regular expression
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @param onlyVisible {@code true} if only visible text views should be waited for
* @return {@code true} if text is shown and {@code false} if it is not shown before the timeout
5. waitForView(final Class<T> viewClass)
* Waits for a View of a certain class to be shown. Default timeout is 20 seconds.
* @param viewClass the {@link View} class to wait for
* @return {@code true} if the {@link View} is shown and {@code false} if it is not shown before the timeout
6. waitForView(View view)
* Waits for a given View to be shown. Default timeout is 20 seconds.
* @param view the {@link View} object to wait for
* @return {@code true} if the {@link View} is shown and {@code false} if it is not shown before the timeout
7. waitForView(View view, int timeout, boolean scroll)
* Waits for a given View to be shown.
* @param view the {@link View} object to wait for
* @param timeout the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if the {@link View} is shown and {@code false} if it is not shown before the timeout
8. waitForView(final Class<T> viewClass, final int minimumNumberOfMatches, final int timeout)
* Waits for a View of a certain class to be shown.
* @param viewClass the {@link View} class to wait for
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if the {@link View} is shown and {@code false} if it is not shown before the timeout
9. waitForView(final Class<T> viewClass, final int minimumNumberOfMatches, final int timeout,final boolean scroll)
* Waits for a View of a certain class to be shown.
* @param viewClass the {@link View} class to wait for
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if the {@link View} is shown and {@code false} if it is not shown before the timeout
10. waitForWebElement(By by)
* Waits for a WebElement. Default timeout is 20 seconds.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @return {@code true} if the {@link WebElement} is shown and {@code false} if it is not shown before the timeout
11. waitForWebElement(By by, int timeout, boolean scroll)
* Waits for a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param timeout the the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if the {@link WebElement} is shown and {@code false} if it is not shown before the timeout
12. waitForWebElement(By by, int minimumNumberOfMatches, int timeout, boolean scroll)
* Waits for a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param minimumNumberOfMatches the minimum number of matches that are expected to be shown. {@code 0} means any number of matches
* @param timeout the the amount of time in milliseconds to wait
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if the {@link WebElement} is shown and {@code false} if it is not shown before the timeout
13. waitForCondition(Condition condition, final int timeout)
* Waits for a condition to be satisfied.
* @param condition the condition to wait for
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if condition is satisfied and {@code false} if it is not satisfied before the timeout
14. searchEditText(String text)
* Searches for a text string in the EditText objects currently shown and returns true if found. Will automatically scroll when needed.
* @param text the text to search for
* @return {@code true} if an {@link EditText} with the given text is found or {@code false} if it is not found
15. searchButton(String text)
* Searches for a Button with the given text string and returns true if at least one Button
* is found. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @return {@code true} if a {@link Button} with the given text is found and {@code false} if it is not found
16. searchButton(String text, boolean onlyVisible)
* Searches for a Button with the given text string and returns true if at least one Button
* is found. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param onlyVisible {@code true} if only {@link Button} visible on the screen should be searched
* @return {@code true} if a {@link Button} with the given text is found and {@code false} if it is not found
17. searchToggleButton(String text)
* Searches for a ToggleButton with the given text string and returns {@code true} if at least one ToggleButton
* is found. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @return {@code true} if a {@link ToggleButton} with the given text is found and {@code false} if it is not found
18. searchButton(String text, int minimumNumberOfMatches)
* Searches for a Button with the given text string and returns {@code true} if the
* searched Button is found a given number of times. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @return {@code true} if a {@link Button} with the given text is found a given number of times and {@code false}
* if it is not found
19. searchButton(String text, int minimumNumberOfMatches, boolean onlyVisible)
* Searches for a Button with the given text string and returns {@code true} if the
* searched Button is found a given number of times. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @param onlyVisible {@code true} if only {@link Button} visible on the screen should be searched
* @return {@code true} if a {@link Button} with the given text is found a given number of times and {@code false}
* if it is not found
20. searchToggleButton(String text, int minimumNumberOfMatches)
* Searches for a ToggleButton with the given text string and returns {@code true} if the
* searched ToggleButton is found a given number of times. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @return {@code true} if a {@link ToggleButton} with the given text is found a given number of times and {@code false}
* if it is not found
21. searchText(String text)
* Searches for a text string and returns {@code true} if at least one item
* is found with the expected text. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @return {@code true} if the search string is found and {@code false} if it is not found
22. searchText(String text, boolean onlyVisible)
* Searches for a text string and returns {@code true} if at least one item
* is found with the expected text. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param onlyVisible {@code true} if only texts visible on the screen should be searched
* @return {@code true} if the search string is found and {@code false} if it is not found
23. searchText(String text, int minimumNumberOfMatches)
* Searches for a text string and returns {@code true} if the searched text is found a given
* number of times. Will automatically scroll when needed.
* @param text the text to search for. The parameter will be interpreted as a regular expression
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @return {@code true} if text string is found a given number of times and {@code false} if the text string
* is not found
24. searchText(String text, int minimumNumberOfMatches, boolean scroll)
* Searches for a text string and returns {@code true} if the searched text is found a given
* number of times.
* @param text the text to search for. The parameter will be interpreted as a regular expression.
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @param scroll {@code true} if scrolling should be performed
* @return {@code true} if text string is found a given number of times and {@code false} if the text string
* is not found
25. searchText(String text, int minimumNumberOfMatches, boolean scroll, boolean onlyVisible)
* Searches for a text string and returns {@code true} if the searched text is found a given
* number of times.
* @param text the text to search for. The parameter will be interpreted as a regular expression.
* @param minimumNumberOfMatches the minimum number of matches expected to be found. {@code 0} matches means that one or more
* matches are expected to be found
* @param scroll {@code true} if scrolling should be performed
* @param onlyVisible {@code true} if only texts visible on the screen should be searched
* @return {@code true} if text string is found a given number of times and {@code false} if the text string
* is not found
26. setActivityOrientation(int orientation)
* Sets the Orientation (Landscape/Portrait) for the current activity.
* @param orientation the orientation to be set. <code>Solo.</code>{@link #LANDSCAPE} for landscape or
* <code>Solo.</code>{@link #PORTRAIT} for portrait.
27. getCurrentActivity()
* Returns the current Activity.
* @return the current Activity
28. assertCurrentActivity(String message, String name)
* Asserts that the expected Activity is the currently active one.
* @param message the message that should be displayed if the assert fails
* @param name the name of the {@link Activity} that is expected to be active e.g. {@code "MyActivity"}
29. assertCurrentActivity(String message, @SuppressWarnings("rawtypes") Class expectedClass)
* Asserts that the expected Activity is the currently active one.
* @param message the message that should be displayed if the assert fails
* @param expectedClass the {@code Class} object that is expected to be active e.g. {@code MyActivity.class}
30. assertCurrentActivity(String message, String name, boolean isNewInstance)
* 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.
* @param message the message that should be displayed if the assert fails
* @param name the name of the activity that is expected to be active e.g. {@code "MyActivity"}
* @param isNewInstance {@code true} if the expected {@link Activity} is a new instance of the {@link Activity}
31. assertCurrentActivity(String message, @SuppressWarnings("rawtypes") Class expectedClass, boolean isNewInstance)
* 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.
* @param message the message that should be displayed if the assert fails
* @param expectedClass the {@code Class} object that is expected to be active e.g. {@code MyActivity.class}
* @param isNewInstance {@code true} if the expected {@link Activity} is a new instance of the {@link Activity}
32. assertMemoryNotLow()
* Asserts that the available memory is not considered low by the system.
33. waitForDialogToOpen(long timeout)
* Waits for a Dialog to open.
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if the {@link android.app.Dialog} is opened before the timeout and {@code false} if it is not opened
34. waitForDialogToClose(long timeout)
* Waits for a Dialog to close.
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if the {@link android.app.Dialog} is closed before the timeout and {@code false} if it is not closed
35. goBack()
* Simulates pressing the hardware back key.
36. clickOnScreen(float x, float y)
* Clicks on a given coordinate on the screen.
* @param x the x coordinate
* @param y the y coordinate
37. clickLongOnScreen(float x, float y)
* Long clicks a given coordinate on the screen.
* @param x the x coordinate
* @param y the y coordinate
38. clickLongOnScreen(float x, float y, int time)
* Long clicks a given coordinate on the screen for a given amount of time.
* @param x the x coordinate
* @param y the y coordinate
* @param time the amount of time to long click
39. clickOnButton(String name)
* Clicks on a Button with a given text. Will automatically scroll when needed.
* @param name the name of the {@link Button} presented to the user. The parameter will be interpreted as a regular expression
40. clickOnImageButton(int index)
* Clicks on an ImageButton with a given index.
* @param index the index of the {@link ImageButton} to be clicked. 0 if only one is available
41. clickOnToggleButton(String name)
* Clicks on a ToggleButton with a given text.
* @param name the name of the {@link ToggleButton} presented to the user. The parameter will be interpreted as a regular expression
42. clickOnMenuItem(String text)
* Clicks on a MenuItem with a given text.
* @param text the menu text that should be clicked on. The parameter will be interpreted as a regular expression
43. clickOnMenuItem(String text, boolean subMenu)
* Clicks on a MenuItem with a given text.
* @param text the menu text that should be clicked on. The parameter will be interpreted as a regular expression
* @param subMenu true if the menu item could be located in a sub menu
44. clickOnWebElement(WebElement webElement)
* Clicks on the given WebElement.
* @param webElement the WebElement to click
45. clickOnWebElement(By by)
* Clicks on a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
46. clickOnWebElement(By by, int match)
* Clicks on a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param match if multiple objects match, this determines which one will be clicked
47. clickOnWebElement(By by, int match, boolean scroll)
* Clicks on a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param match if multiple objects match, this determines which one will be clicked
* @param scroll {@code true} if scrolling should be performed
48. void pressMenuItem(int index)
* Presses a MenuItem with a given index. Index {@code 0} is the first item in the
* first row, Index {@code 3} is the first item in the second row and
* index {@code 6} is the first item in the third row.
* @param index the index of the {@link android.view.MenuItem} to be pressed
49. pressMenuItem(int index, int itemsPerRow)
* 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.
* @param index the index of the {@link android.view.MenuItem} to be pressed
* @param itemsPerRow the amount of menu items there are per row.
50. pressSpinnerItem(int spinnerIndex, int itemIndex)
* Presses on a Spinner (drop-down menu) item.
* @param spinnerIndex the index of the {@link Spinner} menu to be used
* @param itemIndex the index of the {@link Spinner} item to be pressed relative to the currently selected item
* A Negative number moves up on the {@link Spinner}, positive moves down
51. clickOnView(View view)
* Clicks on a given View.
* @param view the {@link View} to be clicked
52. clickOnView(View view, boolean immediately)
* Clicks on a given View.
* @param view the {@link View} to be clicked
* @param immediately true if view is to be clicked without any wait
53. clickLongOnView(View view)
* Long clicks on a given View.
* @param view the {@link View} to be long clicked
54. clickLongOnView(View view, int time)
* Long clicks on a given View for a given amount of time.
* @param view the {@link View} to be long clicked
* @param time the amount of time to long click
55. clickOnText(String text)
* Clicks on a View displaying a given
* text. Will automatically scroll when needed.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
56. clickOnText(String text, int match)
* Clicks on a View displaying a given text. Will automatically scroll when needed.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param match if multiple objects match the text, this determines which one will be clicked
57. clickOnText(String text, int match, boolean scroll)
* Clicks on a View displaying a given text.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param match if multiple objects match the text, this determines which one will be clicked
* @param scroll true if scrolling should be performed
58. void clickLongOnText(String text)
* Long clicks on a given View. Will automatically scroll when needed. {@link #clickOnText(String)} can then be
* used to click on the context menu items that appear after the long click.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
59 . clickLongOnText(String text, int match)
* Long clicks on a given View. Will automatically scroll when needed. {@link #clickOnText(String)} can then be
* used to click on the context menu items that appear after the long click.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param match if multiple objects match the text, this determines which one will be clicked
60. clickLongOnText(String text, int match, boolean scroll)
* Long clicks on a given View. {@link #clickOnText(String)} can then be
* used to click on the context menu items that appear after the long click.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param match if multiple objects match the text, this determines which one will be clicked
* @param scroll true if scrolling should be performed
61. clickLongOnText(String text, int match, int time)
* Long clicks on a given View. {@link #clickOnText(String)} can then be
* used to click on the context menu items that appear after the long click.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param match if multiple objects match the text, this determines which one will be clicked
* @param time the amount of time to long click
62. clickLongOnTextAndPress(String text, int index)
* Long clicks on a given View and then selects
* an item from the context menu that appears. Will automatically scroll when needed.
* @param text the text to be clicked. The parameter will be interpreted as a regular expression
* @param index the index of the menu item to be pressed. {@code 0} if only one is available
63. clickOnButton(int index)
* Clicks on a Button with a given index.
* @param index the index of the {@link Button} to be clicked. {@code 0} if only one is available
64. clickOnRadioButton(int index)
* Clicks on a RadioButton with a given index.
* @param index the index of the {@link RadioButton} to be clicked. {@code 0} if only one is available
65. clickOnCheckBox(int index)
* Clicks on a CheckBox with a given index.
* @param index the index of the {@link CheckBox} to be clicked. {@code 0} if only one is available
66. clickOnEditText(int index)
* Clicks on an EditText with a given index.
* @param index the index of the {@link EditText} to be clicked. {@code 0} if only one is available
67. clickInList(int line)
* Clicks on a given list line and returns an ArrayList of the TextView objects that
* the list line is showing. Will use the first ListView it finds.
* @param line the line to be clicked
* @return an {@code ArrayList} of the {@link TextView} objects located in the list line
68. clickInList(int line, int index)
* Clicks on a given list line on a specified ListView and
* returns an ArrayList of the TextView objects that the list line is showing.
* @param line the line to be clicked
* @param index the index of the list. 1 if two lists are available
* @return an {@code ArrayList} of the {@link TextView} objects located in the list line
69. clickLongInList(int line)
* Long clicks on a given list line and returns an ArrayList of the TextView objects that
* the list line is showing. Will use the first ListView it finds.
* @param line the line to be clicked
* @return an {@code ArrayList} of the {@link TextView} objects located in the list line
70. clickLongInList(int line, int index)
* Long clicks on a given list line on a specified ListView and
* returns an ArrayList of the TextView objects that the list line is showing.
* @param line the line to be clicked
* @param index the index of the list. 1 if two lists are available
* @return an {@code ArrayList} of the {@link TextView} objects located in the list line
71. clickLongInList(int line, int index, int time)
* Long clicks on a given list line on a specified ListView and
* returns an ArrayList of the TextView objects that the list line is showing.
* @param line the line to be clicked
* @param index the index of the list. 1 if two lists are available
* @param time the amount of time to long click
* @return an {@code ArrayList} of the {@link TextView} objects located in the list line
72. clickOnActionBarItem(int resourceId)
* Clicks on an ActionBar item with a given resource id.
* @param resourceId the R.id of the ActionBar item
73. clickOnActionBarHomeButton()
* Clicks on an ActionBar Home/Up button.
74. drag(float fromX, float toX, float fromY, float toY, int stepCount)
* Simulate touching a given location and dragging it to a new location.
* This method was copied from {@code TouchUtils.java} in the Android Open Source Project, and modified here.
* @param fromX X coordinate of the initial touch, in screen coordinates
* @param toX X coordinate of the drag destination, in screen coordinates
* @param fromY X coordinate of the initial touch, in screen coordinates
* @param toY Y coordinate of the drag destination, in screen coordinates
* @param stepCount How many move steps to include in the drag
75. scrollDown()
* Scrolls down the screen.
* @return {@code true} if more scrolling can be done and {@code false} if it is at the end of
* the screen
76. scrollToBottom()
* Scrolls to the bottom of the screen.
77. scrollUp()
* Scrolls up the screen.
* @return {@code true} if more scrolling can be done and {@code false} if it is at the top of
* the screen
78. scrollToTop()
* Scrolls to the top of the screen.
79. scrollDownList(AbsListView list)
* Scrolls down a given ListView.
* @param list the {@link AbsListView} to be scrolled
* @return {@code true} if more scrolling can be done
80. scrollListToBottom(AbsListView list)
* Scrolls to the bottom of a given ListView.
* @param list the {@link AbsListView} to be scrolled
* @return {@code true} if more scrolling can be done
81. scrollUpList(AbsListView list)
* Scrolls up a given ListView.
* @param list the {@link AbsListView} to be scrolled
* @return {@code true} if more scrolling can be done
82. scrollListToTop(AbsListView list)
* Scrolls to the top of a given ListView.
* @param list the {@link AbsListView} to be scrolled
* @return {@code true} if more scrolling can be done
83. scrollDownList(int index)
* Scrolls down a ListView with a given index.
* @param index the {@link ListView} to be scrolled. {@code 0} if only one list is available
* @return {@code true} if more scrolling can be done
84. scrollListToBottom(int index)
* Scrolls a ListView with a given index to the bottom.
* @param index the {@link ListView} to be scrolled. {@code 0} if only one list is available
* @return {@code true} if more scrolling can be done
85. scrollUpList(int index)
* Scrolls up a ListView with a given index.
* @param index the {@link ListView} to be scrolled. {@code 0} if only one list is available
* @return {@code true} if more scrolling can be done
86. scrollListToTop(int index)
* Scrolls a ListView with a given index to the top.
* @param index the {@link ListView} to be scrolled. {@code 0} if only one list is available
* @return {@code true} if more scrolling can be done
87. scrollListToLine(AbsListView absListView, int line)
* Scroll the given ListView to a given line.
* @param absListView the {@link AbsListView} to scroll
* @param line the line to scroll to
88. scrollListToLine(int index, int line)
* Scroll a ListView with a given index to a given line.
* @param index the index of the {@link AbsListView} to scroll
* @param line the line to scroll to
89. scrollToSide(int side)
* Scrolls horizontally.
* @param side the side to which to scroll; {@link #RIGHT} or {@link #LEFT}
90.scrollViewToSide(View view, int side)
* Scrolls a View horizontally.
* @param view the View to scroll
* @param side the side to scroll; {@link #RIGHT} or {@link #LEFT}
91. setDatePicker(int index, int year, int monthOfYear, int dayOfMonth)
* Sets the date in a DatePicker with a given index.
* @param index the index of the {@link DatePicker}. {@code 0} if only one is available
* @param year the year e.g. 2011
* @param monthOfYear the month which starts from zero e.g. 0 for January
* @param dayOfMonth the day e.g. 10
92. setDatePicker(DatePicker datePicker, int year, int monthOfYear, int dayOfMonth)
* Sets the date in a given DatePicker.
* @param datePicker the {@link DatePicker} object.
* @param year the year e.g. 2011
* @param monthOfYear the month which starts from zero e.g. 03 for April
* @param dayOfMonth the day e.g. 10
93. setTimePicker(int index, int hour, int minute)
* Sets the time in a TimePicker with a given index.
* @param index the index of the {@link TimePicker}. {@code 0} if only one is available
* @param hour the hour e.g. 15
* @param minute the minute e.g. 30
94. setTimePicker(TimePicker timePicker, int hour, int minute)
* Sets the time in a given TimePicker.
* @param timePicker the {@link TimePicker} object.
* @param hour the hour e.g. 15
* @param minute the minute e.g. 30
95. setProgressBar(int index, int progress)
* Sets the progress of a ProgressBar with a given index. Examples are SeekBar and RatingBar.
* @param index the index of the {@link ProgressBar}
* @param progress the progress that the {@link ProgressBar} should be set to
96. setProgressBar(ProgressBar progressBar, int progress)
* Sets the progress of a given ProgressBar. Examples are SeekBar and RatingBar.
* @param progressBar the {@link ProgressBar}
* @param progress the progress that the {@link ProgressBar} should be set to
97. setSlidingDrawer(int index, int status)
* Sets the status of a SlidingDrawer with a given index. Examples are Solo.CLOSED and Solo.OPENED.
* @param index the index of the {@link SlidingDrawer}
* @param status the status that the {@link SlidingDrawer} should be set to
98. setSlidingDrawer(SlidingDrawer slidingDrawer, int status)
* Sets the status of a given SlidingDrawer. Examples are Solo.CLOSED and Solo.OPENED.
* @param slidingDrawer the {@link SlidingDrawer}
* @param status the status that the {@link SlidingDrawer} should be set to
99. enterText(int index, String text)
* Enters text in an EditText with a given index.
* @param index the index of the {@link EditText}. {@code 0} if only one is available
* @param text the text string to enter into the {@link EditText} field
100. enterText(EditText editText, String text)
* Enters text in a given EditText.
* @param editText the {@link EditText} to enter text into
* @param text the text string to enter into the {@link EditText} field
101. enterTextInWebElement(By by, String text)
* Enters text in a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param text the text to enter
102. typeText(int index, String text)
* Types text in an EditText with a given index.
* @param index the index of the {@link EditText}. {@code 0} if only one is available
* @param text the text string to type in the {@link EditText} field
103. typeText(EditText editText, String text)
* Types text in a given EditText.
* @param editText the {@link EditText} to type text in
* @param text the text string to type in the {@link EditText} field
104. typeTextInWebElement(By by, String text)
* Types text in a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param text the text to enter
105. typeTextInWebElement(By by, String text, int match)
* Types text in a WebElement.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param text the text to enter
* @param match if multiple objects match, this determines which one will be typed in
106. typeTextInWebElement(WebElement webElement, String text)
* Types text in a WebElement.
* @param webElement the WebElement to type text in
* @param text the text to enter
107. clearEditText(int index)
* Clears the value of an EditText.
* @param index the index of the {@link EditText} that should be cleared. 0 if only one is available
108. clearEditText(EditText editText)
* Clears the value of an EditText.
* @param editText the {@link EditText} that should be cleared
109. clearTextInWebElement(By by)
* Clears text in a web element.
* @param by the By object. Examples are By.id("id") and By.name("name")
110. clickOnImage(int index)
* Clicks on an ImageView with a given index.
* @param index the index of the {@link ImageView} to be clicked. {@code 0} if only one is available
111. getEditText(int index)
* Returns an EditText with a given index.
* @param index the index of the {@link EditText}. {@code 0} if only one is available
* @return the {@link EditText} with a specified index or {@code null} if index is invalid
112. getButton(int index)
* Returns a Button with a given index.
* @param index the index of the {@link Button}. {@code 0} if only one is available
* @return the {@link Button} with a specified index or {@code null} if index is invalid
113. getText(int index)
* Returns a TextView with a given index.
* @param index the index of the {@link TextView}. {@code 0} if only one is available
* @return the {@link TextView} with a specified index or {@code null} if index is invalid
114. getImage(int index)
* Returns an ImageView with a given index.
* @param index the index of the {@link ImageView}. {@code 0} if only one is available
* @return the {@link ImageView} with a specified index or {@code null} if index is invalid
115. getImageButton(int index)
* Returns an ImageButton with a given index.
* @param index the index of the {@link ImageButton}. {@code 0} if only one is available
* @return the {@link ImageButton} with a specified index or {@code null} if index is invalid
116. getText(String text)
* Returns a TextView which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @return the {@link TextView} that shows the given text
117. getText(String text, boolean onlyVisible)
* Returns a TextView which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @param onlyVisible {@code true} if only visible texts on the screen should be returned
* @return the {@link TextView} that shows the given text
118. getButton(String text)
* Returns a Button which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @return the {@link Button} that shows the given text
119. getButton(String text, boolean onlyVisible)
* Returns a Button which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @param onlyVisible {@code true} if only visible buttons on the screen should be returned
* @return the {@link Button} that shows the given text
120. getEditText(String text)
* Returns an EditText which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @return the {@link EditText} which shows the given text
121. getEditText(String text, boolean onlyVisible)
* Returns an EditText which shows a given text.
* @param text the text that is shown, specified as a regular expression
* @param onlyVisible {@code true} if only visible EditTexts on the screen should be returned
* @return the {@link EditText} which shows the given text
122. getView(int id)
* Returns a View with a given resource id.
* @param id the R.id of the {@link View} to be returned
* @return a {@link View} with a given id
123. getView(int id, int index)
* Returns a View with a given resource id and index.
* @param id the R.id of the {@link View} to be returned
* @param index the index of the {@link View}. {@code 0} if only one is available
* @return a {@link View} with a given id and index
124. getView(Class<T> viewClass, int index)
* Returns a View of a given class and index.
* @param viewClass the class of the requested view
* @param index the index of the {@link View}. {@code 0} if only one is available
* @return a {@link View} with a given class and index
125. getWebElement(By by, int index)
* Returns a WebElement with a given index
* @param by the By object. Examples are By.id("id") and By.name("name")
* @param index the index of the {@link WebElement}. {@code 0} if only one is available
* @return a {@link WebElement} with a given index
126. getWebUrl()
* Returns the current web page URL.
* @return the current web page URL
127. getCurrentViews()
* Returns an ArrayList of the Views currently shown in the focused Activity or Dialog.
* @return an {@code ArrayList} of the {@link View} objects currently shown in the
* focused window
128. getCurrentViews(Class<T> classToFilterBy)
* Returns an ArrayList of Views of the specified Class located in the focused Activity or Dialog.
* @param classToFilterBy return all instances of this class. Examples are {@code Button.class} or {@code ListView.class}
* @return an {@code ArrayList} of {@code View}s of the specified {@code Class} located in the current {@code Activity}
129. getCurrentViews(Class<T> classToFilterBy, View parent)
* Returns an ArrayList of Views of the specified Class located under the specified parent.
* @param classToFilterBy return all instances of this class. Examples are {@code Button.class} or {@code ListView.class}
* @param parent the parent {@code View} for where to start the traversal
* @return an {@code ArrayList} of {@code View}s of the specified {@code Class} located under the specified {@code parent}
130.getCurrentWebElements()
* Returns an ArrayList of WebElements currently shown in the active WebView.
* @return an {@code ArrayList} of the {@link WebElement} objects currently shown in the active WebView
131. getCurrentWebElements(By by)
* Returns an ArrayList of WebElements of the specified By object currently shown in the active WebView.
* @param by the By object. Examples are By.id("id") and By.name("name")
* @return an {@code ArrayList} of the {@link WebElement} objects currently shown in the active WebView
132. isRadioButtonChecked(int index)
* Checks if a RadioButton with a given index is checked.
* @param index of the {@link RadioButton} to check. {@code 0} if only one is available
* @return {@code true} if {@link RadioButton} is checked and {@code false} if it is not checked
133. isRadioButtonChecked(String text)
* Checks if a RadioButton with a given text is checked.
* @param text the text that the {@link RadioButton} shows, specified as a regular expression
* @return {@code true} if a {@link RadioButton} with the given text is checked and {@code false} if it is not checked
134. isCheckBoxChecked(int index)
* Checks if a CheckBox with a given index is checked.
* @param index of the {@link CheckBox} to check. {@code 0} if only one is available
* @return {@code true} if {@link CheckBox} is checked and {@code false} if it is not checked
135. isToggleButtonChecked(String text)
* Checks if a ToggleButton with a given text is checked.
* @param text the text that the {@link ToggleButton} shows, specified as a regular expression
* @return {@code true} if a {@link ToggleButton} with the given text is checked and {@code false} if it is not checked
136. isToggleButtonChecked(int index)
* Checks if a ToggleButton with a given index is checked.
* @param index of the {@link ToggleButton} to check. {@code 0} if only one is available
* @return {@code true} if {@link ToggleButton} is checked and {@code false} if it is not checked
137. isCheckBoxChecked(String text)
* Checks if a CheckBox with a given text is checked.
* @param text the text that the {@link CheckBox} shows, specified as a regular expression
* @return {@code true} if a {@link CheckBox} with the given text is checked and {@code false} if it is not checked
138. isTextChecked(String text)
* Checks if the given text is checked.
* @param text the text that the {@link CheckedTextView} or {@link CompoundButton} objects show, specified as a regular expression
* @return {@code true} if the given text is checked and {@code false} if it is not checked
139. isSpinnerTextSelected(String text)
* Checks if a given text is selected in any Spinner located in the current screen.
* @param text the text that is expected to be selected, specified as a regular expression
* @return {@code true} if the given text is selected in any {@link Spinner} and false if it is not
140. isSpinnerTextSelected(int index, String text)
* Checks if a given text is selected in a given Spinner.
* @param index the index of the spinner to check. {@code 0} if only one spinner is available
* @param text the text that is expected to be selected, specified as a regular expression
* @return true if the given text is selected in the given {@link Spinner} and false if it is not
141. sendKey(int key)
* Sends a key: Right, Left, Up, Down, Enter, Menu or Delete.
* @param key the key to be sent. Use {@code Solo.}{@link #RIGHT}, {@link #LEFT}, {@link #UP}, {@link #DOWN},
* {@link #ENTER}, {@link #MENU}, {@link #DELETE}
142. goBackToActivity(String name)
* Returns to the given Activity.
* @param name the name of the {@link Activity} to return to, e.g. {@code "MyActivity"}
143. waitForActivity(String name)
* Waits for the given Activity. Default timeout is 20 seconds.
* @param name the name of the {@code Activity} to wait for e.g. {@code "MyActivity"}
* @return {@code true} if {@code Activity} appears before the timeout and {@code false} if it does not
144. waitForActivity(String name, int timeout)
* Waits for the given Activity.
* @param name the name of the {@link Activity} to wait for e.g. {@code "MyActivity"}
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if {@link Activity} appears before the timeout and {@code false} if it does not
145. waitForActivity(Class<? extends Activity> activityClass)
* Waits for the given Activity. Default timeout is 20 seconds.
* @param activityClass the class of the {@code Activity} to wait for
* @return {@code true} if {@code Activity} appears before the timeout and {@code false} if it does not
146. waitForActivity(Class<? extends Activity> activityClass, int timeout)
* Waits for the given Activity.
* @param activityClass the class of the {@code Activity} to wait for e.g. {@code "MyActivity"}
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if {@link Activity} appears before the timeout and {@code false} if it does not
147. waitForFragmentByTag(String tag)
* Waits for a Fragment with a given tag to appear. Default timeout is 20 seconds.
* @param tag the name of the tag
* @return true if fragment appears and false if it does not appear before the timeout
148. waitForFragmentByTag(String tag, int timeout)
* Waits for a Fragment with a given tag to appear.
* @param tag the name of the tag
* @param timeout the amount of time in milliseconds to wait
* @return true if fragment appears and false if it does not appear before the timeout
149. waitForFragmentById(int id)
* Waits for a Fragment with a given id to appear. Default timeout is 20 seconds.
* @param id the id of the fragment
* @return true if fragment appears and false if it does not appear before the timeout
150. waitForFragmentById(int id, int timeout)
* Waits for a Fragment with a given id to appear.
* @param id the id of the fragment
* @param timeout the amount of time in milliseconds to wait
* @return true if fragment appears and false if it does not appear before the timeout
151. waitForLogMessage(String logMessage)
* Waits for a log message to appear. Default timeout is 20 seconds.
* Requires read logs permission (android.permission.READ_LOGS) in AndroidManifest.xml of the application under test.
* @param logMessage the log message to wait for
* @return true if log message appears and false if it does not appear before the timeout
152. waitForLogMessage(String logMessage, int timeout)
* Waits for a log message to appear.
* Requires read logs permission (android.permission.READ_LOGS) in AndroidManifest.xml of the application under test.
* @param logMessage the log message to wait for
* @param timeout the amount of time in milliseconds to wait
* @return true if log message appears and false if it does not appear before the timeout
153. getString(int resId)
* Returns a localized string.
* @param resId the resource id of the string
* @return the localized string
154.sleep(int time)
* Robotium will sleep for a specified time.
* @param time the time in milliseconds that Robotium should sleep
155.finalize()
* Finalizes the solo object and removes the ActivityMonitor.
* @see #finishOpenedActivities() finishOpenedActivities() to close the activities that have been active.
public void finalize() throws Throwable {
activityUtils.finalize();
}
156. finishOpenedActivities()
* The activities that are alive are finished. Usually used in tearDown().
157. takeScreenshot()
* Takes a screenshot and saves it in "/sdcard/Robotium-Screenshots/".
* Requires write permission (android.permission.WRITE_EXTERNAL_STORAGE) in AndroidManifest.xml of the application under test.
158. takeScreenshot(String name)
* Takes a screenshot and saves it with a given name in "/sdcard/Robotium-Screenshots/".
* Requires write permission (android.permission.WRITE_EXTERNAL_STORAGE) in AndroidManifest.xml of the application under test.
* @param name the name to give the screenshot
159. takeScreenshot(String name, int quality)
* Takes a screenshot and saves it with a given name in "/sdcard/Robotium-Screenshots/".
* Requires write permission (android.permission.WRITE_EXTERNAL_STORAGE) in AndroidManifest.xml of the application under test.
* @param name the name to give the screenshot
* @param quality the compression rate. From 0 (compress for lowest size) to 100 (compress for maximum quality).
Thứ Tư, 27 tháng 3, 2013
Đăng ký:
Đăng Nhận xét (Atom)
Học lập trình web căn bản với PHP
Bài 1: Các kiến thức căn bản Part 1: https://jimmyvan88.blogspot.com/2012/05/can-ban-lap-trinh-web-voi-php-bai-1-cac.html Part 2: https://...
-
IMindMap 8.0.4 iMindMap là công cụ tuyệt vời để vẽ bản đồ tư duy đem mọi chi tiết trong đầu bạn ra thành các ý tươgnr, để nắm bắt ý tư...
-
1. Download Bamboo in : http://www.atlassian.com/software/bamboo/download?os=linux cd ~ mkdir BAMBOO cd BAMBOO wget http://www.atlassia...
-
1.Giới thiệu về Vim Vim – Vi iMprove là bản cải thiện của Vim – một trình soạn thảo phổ biến trên Unix. Vim có tính cấu hình rất cao ...
Không có nhận xét nào:
Đăng nhận xét