From 8408cbe3adc8b0df4ae279a2e8689d1066972744 Mon Sep 17 00:00:00 2001
From: Quddus Chong Signifies that a public API (public class, method or field) is subject to
+ incompatible changes, or even removal, in a future release. An API bearing
+ this annotation is exempt from any compatibility guarantees made by its
+ containing library. Note that the presence of this annotation implies nothing
+ about the quality or performance of the API in question, only the fact that
+ it is not "API-frozen."
+
+ About Android |
+ Legal |
+ Support
+ This annotation should be used along with
+ About Android |
+ Legal |
+ Support
+
+ About Android |
+ Legal |
+ Support
+
@@ -483,6 +509,8 @@ type="text/css">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Results
+
+
+
+
+
+
+
Annotations
+
+
+
+
+
+ Beta
+
+
+
+
+
+ implements
+
+ Annotation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+android.support.test.annotation.Beta
+ Class Overview
+Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [Expand]
+
+
+
+
+
+
+From interface
+
+ java.lang.annotation.Annotation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Results
+
+
+
+
+
+
+
Annotations
+
+
+
+
+
+ UiThreadTest
+
+
+
+
+
+ implements
+
+ Annotation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+android.support.test.annotation.UiThreadTest
+ Class Overview
+UiThreadTestRule
+ or with any rule that inherits from it. When the annotation is present, the test method is
+ executed on the application's UI thread (or main thread).
+ Before
and
+ After
will
+ also be executed on the UI Thread. Consider using
+ runOnUiThread(Runnable)
if this is an
+ issue.
+
+
+
+ See Also
+
+ Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [Expand]
+
+
+
+
+
+
+From interface
+
+ java.lang.annotation.Annotation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Results
+
+
+
+
+
+
+
Annotations
+
+
+
+
+
+ android.support.test.annotation
+Annotations
+
+
+
+
+
+
+
+
+ Beta
+
+ Signifies that a public API (public class, method or field) is subject to
+ incompatible changes, or even removal, in a future release.
+
+
+
+
+
+
+
+
+ UiThreadTest
+
+ This annotation should be used along with
+ UiThreadTestRule
+ or with any rule that inherits from it.
+
+
+
+
@@ -482,6 +508,8 @@ type="text/css">
@@ -482,6 +508,8 @@ type="text/css">
@@ -482,6 +508,8 @@ type="text/css">
@@ -482,6 +508,8 @@ type="text/css">
@@ -482,6 +508,8 @@ type="text/css">
true
if all resources were successfully registered
+Unregisters one or more IdlingResource
s. If any of the given resources are not already
registered, a warning is logged.
true
if all resources were successfully unregistered
+getIdleTimeout()
.
@@ -1157,7 +1195,7 @@ From class
- The unit for {@linkgetIdleTimeout }. +
The unit for getIdleTimeout()
.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
java.lang.Object | +|
↳ | + +android.support.test.espresso.action.MotionEvents.DownResultHolder | +
Holds the result of a down motion. +
+ + + + + +Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
down | ++ + + + + | +||||||||||
longPress | ++ + + + + | +
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.espresso.action.MotionEvents | +
Facilitates sending of motion events to a UiController
.
+
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MotionEvents.DownResultHolder | ++ Holds the result of a down motion. + + + + | +
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
+ About Android | + Legal | + Support +
+A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
A mechanism for ViewActions to specify what type of views they can operate on. - A ViewAction can demand that the view passed to perform meets certain constraints. For example + A ViewAction can demand that the view passed to perform meets certain constraints. For example it may want to ensure the view is already in the viewable physical screen of the device or is of a certain type.
ERROR(/#globalAssertions)
and then performs the given
+ ViewAction
+
+
+
+ ViewAssertion
to be run every time a ViewAction
in this class is
+ performed.
+
+
+
+ openLink(Matcher linkTextMatcher, Matcher uriMatcher)
, but uses
+ any(String.class)
as the linkTextMatcher.
+
+
+
+ openLink(Matcher linkTextMatcher, Matcher uriMatcher)
, but uses
- any(String.class)
as the linkTextMatcher.
+ Returns an action that clicks the back button.
@@ -1040,10 +1167,11 @@ Summary:
ViewAction
Performs all assertions in ERROR(/#globalAssertions)
and then performs the given
+ ViewAction
viewAction + | the ViewAction to perform after the assertions
+ |
+
---|
Adds a ViewAssertion
to be run every time a ViewAction
in this class is
+ performed. The assertion will be run prior to performing the action.
name + | a name of the assertion to be added | +
---|---|
viewAssertion + | a ViewAssertion to be added |
+
IllegalArgumentException + | if the name/viewAssertion pair is already contained in the + global assertions. + | +
---|
Same as openLinkWithUri(Matcher
, but uses is(uri)
as the
- uriMatcher.
+
Same as openLink(Matcher
, but uses
+ any(String.class)
as the linkTextMatcher.
Same as openLink(Matcher
, but uses
- any(String.class)
as the linkTextMatcher.
+
Same as openLinkWithUri(Matcher
, but uses is(uri)
as the
+ uriMatcher.
Returns an action that presses the specified key with the specified modifiers. +
Returns an action that presses the key specified by the keyCode (eg. Keyevent.KEYCODE_BACK).
Returns an action that presses the key specified by the keyCode (eg. Keyevent.KEYCODE_BACK). +
Returns an action that presses the specified key with the specified modifiers.
Removes the given assertion from the set of assertions to be run before actions are performed.
viewAssertion + | the assertion to remove | +
---|
IllegalArgumentException + | if the name/viewAssertion pair is not already contained in the + global assertions. + | +
---|
UiController
.
+
+
+
+ Registers the given resources. If any of the given resources are already registered, a warning is logged.
true
if all resources were successfully registered
+Unregisters the given resources. If any of the given resources are not already registered, a warning is logged.
true
if all resources were successfully unregistered
+This interface gives users the ability to override that type of behaviour and explicitly select an item in the RecyclerView at a given position. This is similar to on the onData(...).atPosition() api for AdapterViews.
@@ -955,6 +993,10 @@ From interfaceviewHolderMatcher - | a
- Matcher that matchesan item view holder in RecyclerView |
+ a
+
+ Matcher that matchesan item view holder in RecyclerView |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewAction
@@ -1282,8 +1321,9 @@ From class
Returns a
- Returns a matcher that matches a byte[] at a given column index
+ in a Parameters
Returns a
- Parameters@@ -2199,7 +2229,7 @@ From class - Matcher<Object> + CursorMatchers.CursorMatcher withRowDouble (String columnName, Matcher<Double> valueMatcher) @@ -2215,9 +2245,8 @@ From class - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
valueMatcher - | a
- Matcher that matches a Double value
+ | a
+
+ Matcher that matches a Double value
|
Returns a
- Matcher
that matches a Double
value at a given column index in a
- Cursor
s data row.
+
Returns a
- Matcher
that matches a Double
value at a given column index in a
- Cursor
s data row.
+
columnNameMatcher - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a Double value
+ | a
+
+ Matcher that matches a Double value
|
Returns a
- Matcher
that matches a Float
value at a given column index
+
Matcher
that matches a Float
value
+ Matcher
that matches a Float
value
Returns a
- Matcher
that matches a Float
value at a given column index
+
Returns a Matcher
that matches a Float
value at a given column index
+
Returns a
- Matcher
that matches a Float
value at a given column index
+
columnNameMatcher - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a Float value
+ | a
+
+ Matcher that matches a Float value
|
Returns a
- Matcher
that matches a Float
value at a given column index
+
Matcher
that matches a Float
value
+ Matcher
that matches a Float
value
Returns a
- Matcher
that matches a Integer
value at a given column index
+
Matcher
that matches a Integer
value
+ Matcher
that matches a Integer
value
Returns a
- Matcher
that matches a Integer
value at a given column index
+
Returns a
- Matcher
that matches a Integer
value at a given column index
+
Returns a
- Matcher
that matches a Integer
value at a given column index
+
Matcher
that matches a Integer
value
+ Matcher
that matches a Integer
value
Returns a
- Matcher
that matches a Integer
value at a given column index
+
columnNameMatcher - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a Integer value
+ | a
+
+ Matcher that matches a Integer value
|
Returns a
- Matcher
that matches a Long
value at a given column index
+
Matcher
that matches a Long
value
+ Matcher
that matches a Long
value
Returns a
- Matcher
that matches a Long
value at a given column index in a
- Cursor
s data row.
+
Returns a
- Matcher
that matches a Long
value at a given column index
+
Returns a
- Matcher
that matches a Long
value at a given column index
- in a Cursor
s data row.
+
Matcher
that matches a Long
value
+ Matcher
that matches a Long
value
Returns a
- Matcher
that matches a Long
value at a given column index
+
columnNameMatcher - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a Long value
+ | a
+
+ Matcher that matches a Long value
|
Returns a
- Matcher
that matches a Short
value at a given column index
+
Matcher
that matches a Short
value
+ Matcher
that matches a Short
value
Returns a
- Matcher
that matches a Short
value at a given column index
+
Matcher
that matches a Short
value
+ Matcher
that matches a Short
value
Returns a
- Matcher
that matches a Short
value at a given column index
+
Returns a
- Matcher
that matches a Short
value at a given column index
+
columnNameMatcher - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a Short value
+ | a
+
+ Matcher that matches a Short value
|
Returns a
- Matcher
that matches a Short
value at a given column index
+
Returns a
- Matcher
that matches a String
value at a given column index
+
Returns a
- Matcher
that matches a String
value at a given column index
+
Matcher
that matches a String
value
+ Matcher
that matches a String
value
Returns a
- Matcher
that matches a String
value at a given column index
+
Returns a
- Matcher
that matches a String
value at a given column index
+
Matcher
that matches a String
value
+ Matcher
that matches a String
value
Returns a
- Matcher
that matches a String
value at a given column index
+
columnPicker - | as a
- Matcher of String |
+ as a
+
+ Matcher of String |
---|---|---|
valueMatcher - | a
- Matcher that matches a String value
+ | a
+
+ Matcher that matches a String value
|
View
s based on the presence of a descendant in its
- view hierarchy.
+ Returns a matcher that matches View
s based on the presence of a descendant in its view
+ hierarchy.
@@ -1023,8 +1062,8 @@ Summary:
isChecked()
View
s that are currently displayed on the screen to
- the user.
+ Returns a matcher that matches View
s that are currently displayed on the screen to the
+ user.
@@ -1234,8 +1273,8 @@ Summary:
isNotChecked()
Matcher
that matches View
s based on content description
- property value.
+ Matcher
that matches View
s based on content description property
+ value.
@@ -1400,8 +1439,8 @@ Summary:
Matcher
that matches View
s based on content description
- property value.
+ Matcher
that matches View
s based on content description property
+ value.
@@ -1421,11 +1460,12 @@ Summary:
Matcher<View>
View
s that have "effective" visibility set to the given
+ value.
+
+
+
+ Returns a matcher that matches View
s based on the presence of a descendant in its
- view hierarchy.
Returns a matcher that matches View
s based on the presence of a descendant in its view
+ hierarchy.
siblingMatcher - | a
- Matcher for the sibling of the view.
+ | a
+
+ Matcher for the sibling of the view.
|
---|
Returns a matcher that accepts if and only if the view is a CompoundButton (or subtype of) - and is in checked state. +
Returns a matcher that accepts if and only if the view is a CompoundButton (or subtype of) and + is in checked state.
Returns a matcher which only accepts a view whose height and width fit perfectly within the currently displayed region of this view. -
+ There exist views (such as ScrollViews) whose height and width are larger then the physical device screen by design. Such views will _never_ be completely displayed.Returns a matcher that matches View
s that are currently displayed on the screen to
- the user.
-
Returns a matcher that matches View
s that are currently displayed on the screen to the
+ user.
+
+ Note: isDisplayed will select views that are partially displayed (eg: the full height/width of
+ the view is greater then the height/width of the visible rectangle). If you wish to ensure the
+ entire rectangle this view draws is displayed to the user use isCompletelyDisplayed.
Returns a matcher that accepts if and only if the view is a CompoundButton (or subtype of) - and is not in checked state. +
Returns a matcher that accepts if and only if the view is a CompoundButton (or subtype of) and + is not in checked state.
Returns an
- Matcher
that matches View
s based on content description
- property value. Sugar for withContentDescription(is("string")).
Matcher
that matches View
s based on content description property
+ value. Sugar for withContentDescription(is("string")).charSequenceMatcher - | a CharSequence
- Matcher for the content description
+ | a CharSequence
+
+ Matcher for the content description
+ |
+
---|
resourceId + | the resource id of the content description to match on. |
---|
Returns a matcher that matches View
s that have "effective" visibility set to the
- given value. Effective visibility takes into account not only the view's visibility value,
- but also that of its ancestors. In case of View.VISIBLE, this means that the view and all of
- its ancestors have visibility=VISIBLE. In case of GONE and INVISIBLE, it's the opposite -
- any GONE or INVISIBLE parent will make all of its children have their effective visibility.
-
Returns a matcher that matches View
s that have "effective" visibility set to the given
+ value. Effective visibility takes into account not only the view's visibility value, but also
+ that of its ancestors. In case of View.VISIBLE, this means that the view and all of its
+ ancestors have visibility=VISIBLE. In case of GONE and INVISIBLE, it's the opposite - any GONE
+ or INVISIBLE parent will make all of its children have their effective visibility.
+
+
+
Note: Contrary to what the name may imply, view visibility does not directly translate into - whether the view is displayed on screen (use isDisplayed() for that). For example, - the view and + whether the view is displayed on screen (use isDisplayed() for that). For example, the view and all of its ancestors can have visibility=VISIBLE, but the view may need to be scrolled to in order to be actually visible to the user. Unless you're specifically targeting the visibility value with your test, use isDisplayed. @@ -3198,7 +3308,7 @@ From class
Matcher
of String
with text to match
+ Matcher
of String
with text to match
Returns a matcher that matches TextView
based on it's hint property value. Note:
- View's Sugar for withHint(is("string")).
Returns a matcher that matches TextView
based on it's hint property value. Note: View's
+ Sugar for withHint(is("string")).
hintText + | String with the hint text to match
+ |
+
---|
Returns a matcher that matches View
s based on resource ids. Note: Android resource
- ids are not guaranteed to be unique. You may have to pair this matcher with another one to
+
Returns a matcher that matches View
s based on resource ids. Note: Android resource ids
+ are not guaranteed to be unique. You may have to pair this matcher with another one to
guarantee a unique view selection.
Returns a matcher that matches Spinner
based on it's selected item's toString value.
-
Note: Sugar for withSpinnerText(is("string")).
Matcher
of String
with text to match.
+ Matcher
of String
with text to match.
Returns a matcher that matches TextView
based on its text property value. Note:
- View's Sugar for withText(is("string")).
Returns a matcher that matches TextView
based on its text property value. Note: View's
+ Sugar for withText(is("string")).
text + | String with the text to match
+ |
+
---|
Returns a matcher that matches TextView
s based on text property value. Note: View's
- text property is never null. If you setText(null) it will still be "". Do not use null
- matcher.
stringMatcher |
- Matcher of String with text to match
+ Matcher of String with text to match
|
---|
Matcher
that matches Cursor
s based on values in their columns.
+
+
+
+ Preference
s.
@@ -664,7 +714,7 @@ type="text/css">
Root
objects.
@@ -675,7 +725,7 @@ type="text/css">
View
s.
diff --git a/docs/html/reference/android/support/test/espresso/package-summary.html b/docs/html/reference/android/support/test/espresso/package-summary.html
index 03fa25be70a..ec4154661d3 100644
--- a/docs/html/reference/android/support/test/espresso/package-summary.html
+++ b/docs/html/reference/android/support/test/espresso/package-summary.html
@@ -93,6 +93,7 @@
+
@@ -110,7 +111,7 @@
href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
-
+
@@ -126,7 +127,9 @@ type="text/css">
var metaTags = [];
var devsite = false;
-
+
+
+
+
java.lang.Object | +||
↳ | + +android.support.test.rule.UiThreadTestRule | +|
+ + | ↳ | + +android.support.test.rule.ActivityTestRule<T extends android.app.Activity> | +
+
+ Known Direct Subclasses
+
+
+
+
+
+
+ IntentsTestRule<T extends Activity>
+
+
+
+
+
+
+
|
This rule provides functional testing of a single activity. The activity under test will be
+ launched before each test annotated with
+ Test
and before
+ methods annotated with
+ Before
. It
+ will be terminated after the test is completed and methods annotated with
+ After
are
+ finished. During the duration of the test you will be able to manipulate your Activity directly.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Similar to
+
+ ActivityTestRule(Class, boolean, boolean) but with "touch mode" disabled.
+
+
+
+ | |||||||||||
+ Similar to
+
+ ActivityTestRule(Class, boolean, boolean) but defaults to launch the
+ activity under test once per
+ Test method.
+
+
+
+ | |||||||||||
+ Creates an
+
+ ActivityTestRule for the Activity under test.
+
+
+
+ |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Launches the Activity under test.
+
+
+
+
+
+ |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Override this method to execute any code that should run after your
+
+ Activity is
+ finished.
+
+
+
+ | |||||||||||
+ Override this method to execute any code that should run before your
+
+ Activity is
+ created and launched.
+
+
+
+ | |||||||||||
+ Override this method to set up Intent as if supplied to
+
+
+ startActivity(Intent) .
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ android.support.test.rule.UiThreadTestRule
+
+
+
+
+
+
+
+
| |||||||||||||||||||||||||||||||||
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||
+
+From interface
+
+ org.junit.rules.TestRule
+
+
+
+
+
+
+
+ |
Similar to ActivityTestRule(Class, boolean, boolean)
but with "touch mode" disabled.
activityClass + | The activity under test. This must be a class in the instrumentation + targetPackage specified in the AndroidManifest.xml | +
---|
Similar to ActivityTestRule(Class, boolean, boolean)
but defaults to launch the
+ activity under test once per
+ Test
method.
+ It is launched before the first
+ Before
+ method, and terminated after the last
+ After
+ method.
activityClass + | The activity under test. This must be a class in the instrumentation + targetPackage specified in the AndroidManifest.xml | +
---|---|
initialTouchMode + | true if the Activity should be placed into "touch mode" when started | +
Creates an ActivityTestRule
for the Activity under test.
activityClass + | The activity under test. This must be a class in the instrumentation + targetPackage specified in the AndroidManifest.xml | +
---|---|
initialTouchMode + | true if the Activity should be placed into "touch mode" when started | +
launchActivity + | true if the Activity should be launched once per
+
+ Test method. It will be launched before the first
+
+ Before method, and terminated after the last
+
+ After method.
+ |
+
Launches the Activity under test. +
+ Don't call this method directly, unless you explicitly requested not to launch the Activity
+ manually using the launchActivity flag in
+ ActivityTestRule(Class, boolean, boolean)
.
+
+ Usage: +
+ @Test + public void customIntentToStartActivity() { + Intent intent = new Intent(Intent.ACTION_PICK); + mActivity = mActivityRule.launchActivity(intent); + } +
startIntent + | The Intent that will be used to start the Activity under test. If
+ startIntent is null, the Intent returned by
+ getActivityIntent() is used. |
+
---|
Override this method to execute any code that should run after your Activity
is
+ launched, but before any test code is run including any method annotated with
+ Before
.
+
+ Prefer
+ Before
+ over this method. This method should usually not be overwritten directly in tests and only be
+ used by subclasses of ActivityTestRule to get notified when the activity is created and
+ visible but test runs.
+
Override this method to set up Intent as if supplied to
+ startActivity(Intent)
.
+
+ The default Intent (if this method returns null or is not overwritten) is:
+ action = ACTION_MAIN
+ flags = FLAG_ACTIVITY_NEW_TASK
+ All other intent fields are null or empty.
startActivity(Intent)
.
++ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.rule.ServiceTestRule | +
A JUnit rule that provides a simplified mechanism to start and shutdown your service before
+ and after the duration of your test. It also guarantees that the service is successfully
+ connected when starting (or binding to) a service. The service can be started
+ (or bound) using one of the helper methods. It will automatically be stopped (or unbound) after
+ the test completes and any methods annotated with
+ After
are
+ finished.
+
+ Note: This rule doesn't support IntentService
because it's automatically
+ destroyed when onHandleIntent(android.content.Intent)
finishes
+ all outstanding commands. So there is no guarantee to establish a successful connection
+ in a timely manner.
+
+
+ Usage: +
+ @Rule + public final ServiceTestRule mServiceRule = new ServiceTestRule(); + + @Test + public void testWithStartedService() { + mServiceRule.startService( + new Intent(InstrumentationRegistry.getTargetContext(), MyService.class)); + //do something + } + + @Test + public void testWithBoundService() { + IBinder binder = mServiceRule.bindService( + new Intent(InstrumentationRegistry.getTargetContext(), MyService.class)); + MyService service = ((MyService.LocalBinder) binder).getService(); + assertTrue("True wasn't returned", service.doSomethingToReturnTrue()); + } ++
+
+ + + + + +Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Creates a
+
+ ServiceTestRule with a default timeout of .DEFAULT_TIMEOUT seconds
+
+
+
+
+ |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Starts the service under test, in the same way as if it were started by
+
+
+ Context.bindService(Intent, ServiceConnection, flags) with an
+ Intent that identifies a service.
+
+
+
+ | |||||||||||
+ Works just like
+
+
+ bindService(android.content.Intent, android.content.ServiceConnection, int) except
+ uses an internal ServiceConnection to guarantee successful bound.
+
+
+
+ | |||||||||||
+ Starts the service under test and blocks until the service is connected, in the same way as
+ if it were started by
+
+ Context.startService(Intent) with an Intent that identifies a
+ service.
+
+
+
+ | |||||||||||
+ Factory method to create a
+
+ ServiceTestRule with a custom timeout
+
+
+
+ |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Override this method to do your own service specific clean up after the service is shutdown.
+
+
+
+
+
+ | |||||||||||
+ Override this method to do your own service specific initialization before starting or
+ binding to the service.
+
+
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||
+
+From interface
+
+ org.junit.rules.TestRule
+
+
+
+
+
+
+
+ |
Creates a ServiceTestRule
with a default timeout of .DEFAULT_TIMEOUT
seconds
+
Starts the service under test, in the same way as if it were started by
+ Context.bindService(Intent, ServiceConnection, flags)
with an
+ Intent
that identifies a service. However, it waits for
+ onServiceConnected(android.content.ComponentName, android.os.IBinder)
to be called before returning.
intent + | Identifies the service to connect to. The Intent may
+ specify either an explicit component name, or a logical
+ description (action, category, etc) to match an
+ IntentFilter published by a service. |
+
---|---|
connection + | Receives information as the service is started and stopped. + This must be a valid ServiceConnection object; it must not be null. | +
flags + | Operation options for the binding. May be 0,
+ BIND_AUTO_CREATE ,
+ BIND_DEBUG_UNBIND ,
+ BIND_NOT_FOREGROUND ,
+ BIND_ABOVE_CLIENT ,
+ BIND_ALLOW_OOM_MANAGEMENT , or
+ BIND_WAIVE_PRIORITY . |
+
SecurityException + | if the called doesn't have permission to bind to the given service. | +
---|---|
TimeoutException + | if timed out waiting for a successful connection with the service. | +
Works just like
+ bindService(android.content.Intent, android.content.ServiceConnection, int)
except
+ uses an internal ServiceConnection
to guarantee successful bound.
+ The operation option flag defaults to BIND_AUTO_CREATE
TimeoutException + | + |
---|
Starts the service under test and blocks until the service is connected, in the same way as
+ if it were started by Context.startService(Intent)
with an Intent
that identifies a
+ service. If you use this method to start the service, it is automatically stopped at the
+ end of the test run. However, it also binds to the service and waits for
+ onServiceConnected(android.content.ComponentName, android.os.IBinder)
to be called to ensure successful connection.
intent + | An Intent that identifies a service, of the same form as the Intent passed to
+ Context.startService
+ (Intent) . |
+
---|
SecurityException + | if you do not have permission to bind to the given service. | +
---|---|
TimeoutException + | if timed out waiting for a successful connection with the service. + | +
Factory method to create a ServiceTestRule
with a custom timeout
timeout + | the amount of time to wait for a service to connect. | +
---|---|
timeUnit + | the time unit representing how the timeout parameter should be interpreted | +
ServiceTestRule
with the desired timeout
+Override this method to do your own service specific clean up after the service is shutdown.
+ The method is called after each test method is executed including any method annotated with
+ After
+ and after necessary calls to stop (or unbind) the service under test were called.
+
Override this method to do your own service specific initialization before starting or
+ binding to the service. The method is called before each test method is executed including
+ any method annotated with
+ Before
.
+ Do not start or bind to a service from here!
+
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.rule.UiThreadTestRule | +
+
+ Known Direct Subclasses
+
+
+
+
+
+
+ ActivityTestRule<T extends Activity>
+
+
+
+
+
+
+
|
+
+ Known Indirect Subclasses
+
+
+
+
+
+
+ IntentsTestRule<T extends Activity>
+
+
+
+
+
+
+
|
This rule allows the test method annotated with UiThreadTest
to execute on the
+ application's main thread (or UI thread).
+
Before
and
+ After
will
+ also be executed on the UI thread.
+
+
+
+ Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Helper for running portions of a test on the UI thread.
+
+
+
+
+
+ |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||
+
+From interface
+
+ org.junit.rules.TestRule
+
+
+
+
+
+
+
+ |
Helper for running portions of a test on the UI thread. +
+ Note, in most cases it is simpler to annotate the test method with +UiThreadTest
, which will run the entire test method including methods annotated with
+ Before
+ and
+ After
on the UI thread.
+
+ Use this method if you need to switch in and out of the UI thread to perform your test.runnable + | runnable containing test code in the run() method |
+
---|
Throwable + | + |
---|
+ About Android | + Legal | + Support +
+ActivityTestRule<T extends Activity> | ++ This rule provides functional testing of a single activity. + + + + | +
ServiceTestRule | ++ A JUnit rule that provides a simplified mechanism to start and shutdown your service before + and after the duration of your test. + + + + | +
UiThreadTestRule | +
+ This rule allows the test method annotated with UiThreadTest to execute on the
+ application's main thread (or UI thread).
+
+
+
+ |
+
+ About Android | + Legal | + Support +
+An Instrumentation
that runs JUnit3 and JUnit4 tests against
an Android package (application).
InstrumentationTestRunner
.
-
- Will eventually support a superset of InstrumentationTestRunner
features,
+ Based on and replacement for InstrumentationTestRunner
. Supports a superset
+ of InstrumentationTestRunner
features,
while maintaining command/output format compatibility with that class.
RunListener
s to observe the test run:
-e listener com.foo.Listener,com.foo.Listener2
- OR, specify the multiple listeners in the AndroidManifest via a meta-data tag:
- instrumentation android:name="android.support.test.runner.AndroidJUnitRunner" ...
- meta-data android:name="listener"
- android:value="com.foo.Listener,com.foo.Listener2"
-
Set timeout (in milliseconds) that will be applied to each test:
-e timeout_msec 5000
@@ -857,6 +886,18 @@ Summary:
To disable Google Analytics:
-e disableAnalytics true
+
+ In order to make sure we are on the right track with each new release,
+ the test runner collects analytics. More specifically, it uploads a hash of the package name
+ of the application under test for each invocation. This allows us to measure both the count of
+ unique packages using this library as well as the volume of usage.
+
+ All arguments can also be specified in the in the AndroidManifest via a meta-data tag:
+ eg. using listeners:
+ instrumentation android:name="android.support.test.runner.AndroidJUnitRunner" ...
+ meta-data android:name="listener"
+ android:value="com.foo.Listener,com.foo.Listener2"
+ Arguments specified via shell will take override manifest specified arguments.
@@ -897,27 +938,6 @@ Summary:
-
-Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | -ARGUMENT_TEST_CLASS | -- - - - - | -
InstantiationException - | - |
---|---|
IllegalAccessException - | - |
+
+
+
+
InstantiationException + | + |
---|---|
IllegalAccessException + | + |
android.support.test.runner.intent.IntentCallback | +
Callback for monitoring Intents captured by Instrumentation
.
+
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Called on main thread when an activity is started from the current instrumentation process
+ by the given intent.
+
+
+
+
+
+ |
Called on main thread when an activity is started from the current instrumentation process + by the given intent. +
+ About Android | + Legal | + Support +
+android.support.test.runner.intent.IntentMonitor | +
Interface for tests to use when they need to monitor intents used to start activities from
+ the current Instrumentation
.
+
+ Retrieve instances of the monitor through {@link IntentMonitorRegistry). +
+ Monitoring intents requires support from Instrumentation, therefore do not expect + an instance to be present under any arbitrary instrumentation. +
+ + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Adds an
+
+ IntentCallback , which will be notified when intents are sent from the
+ current instrumentation process.
+
+
+
+ | |||||||||||
+ Removes a previously registered
+
+ IntentCallback .
+
+
+
+ |
Adds an IntentCallback
, which will be notified when intents are sent from the
+ current instrumentation process.
+
Removes a previously registered IntentCallback
.
+
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.runner.intent.IntentMonitorRegistry | +
Exposes an implementation of IntentMonitor
to users.
+
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Returns the IntentMonitor.
+
+
+
+
+
+ | |||||||||||
+ Stores the given
+
+ IntentMonitor instance in the registry.
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
Returns the IntentMonitor. This monitor is not guaranteed to be present under all' + instrumentations.
IllegalStateException + | if no monitor has been registered. + | +
---|
Stores the given IntentMonitor
instance in the registry. Passing null removes the
+ monitor from the registry.
+
+ About Android | + Legal | + Support +
+android.support.test.runner.intent.IntentStubber | +
+
+ Known Indirect Subclasses
+
+
+
+
+
+
+ ResettingStubber,
+
+ ResettingStubberImpl
+
+
+
+
+
+
+
|
Interface to intercept activity launch for a given Intent
and stub
+ Instrumentation.ActivityResult
its response.
+
+ Retrieve instances of the stubber through IntentStubberRegistry
+
+ Stubbing intents requires support from Instrumentation, therefore do not expect an instance + to be present under any arbitrary instrumentation. +
+ + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Returns the first matching stubbed result for the given activity if stubbed result was set
+ by test author.
+
+
+
+
+
+ |
Returns the first matching stubbed result for the given activity if stubbed result was set
+ by test author. The method searches the list of existing matcher/response pairs in reverse
+ order of which they were entered; i.e. the last stubbing has the highest priority. If no
+ stubbed result matching the given intent is found, null
is returned.
+
+ Must be called on main thread. +
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.runner.intent.IntentStubberRegistry | +
Exposes an implementation of IntentStubber
.
+
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Returns the loaded Intent Stubber mInstance.
+
+
+
+
+
+ | |||||||||||
+ Loads an
+
+ IntentStubber into this registry.
+
+
+
+ | |||||||||||
+ Clears the current instance of Intent Stubber.
+
+
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
Returns the loaded Intent Stubber mInstance.
IllegalStateException + | if this method is not called on the main thread. | +
---|---|
IllegalStateException + | if no Intent Stubber has been loaded. + | +
IntentStubber
has been loaded.
+Loads an IntentStubber
into this registry. There can only be one active stubber at a
+ time.
+
+ Calling this method multiple times in the same instrumentation will result in an + exception. +
+ This method can be called from any thread. +
Clears the current instance of Intent Stubber. +
+ About Android | + Legal | + Support +
+IntentCallback | +
+ Callback for monitoring Intents captured by Instrumentation .
+
+
+
+ |
+
IntentMonitor | +
+ Interface for tests to use when they need to monitor intents used to start activities from
+ the current Instrumentation .
+
+
+
+ |
+
IntentStubber | +
+ Interface to intercept activity launch for a given Intent and stub
+ Instrumentation.ActivityResult its response.
+
+
+
+ |
+
IntentMonitorRegistry | +
+ Exposes an implementation of IntentMonitor to users.
+
+
+
+ |
+
IntentStubberRegistry | +
+ Exposes an implementation of IntentStubber .
+
+
+
+ |
+
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry | +
An exposed registry instance to make it easy for callers to find the lifecycle monitor for their + application. +
+ + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Returns the ActivityLifecycleMonitor.
+
+
+
+
+
+ | |||||||||||
+ Stores a lifecycle monitor in the registry.
+
+
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
Returns the ActivityLifecycleMonitor. + + This monitor is not guaranteed to be present under all instrumentations.
IllegalStateException + | if no monitor has been registered. + | +
---|
Stores a lifecycle monitor in the registry. +
+ This is a global registry - so be aware of the impact of calling this method! +
monitor + | the monitor for this application. Null deregisters any existing monitor. + | +
---|
+ About Android | + Legal | + Support +
+android.support.test.runner.lifecycle.ApplicationLifecycleCallback | +
Callback for monitoring application lifecycle events. +
+ + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Called on after an application has processed its lifecycle change event
+ (for example onCreate)
+ These callbacks may occur on main thread so implementers should limit the amount of
+ processing performed
+
+
+
+
+
+ |
Called on after an application has processed its lifecycle change event + (for example onCreate) + These callbacks may occur on main thread so implementers should limit the amount of + processing performed
app + | the Application |
+
---|---|
stage + | its current stage. + | +
+ About Android | + Legal | + Support +
+android.support.test.runner.lifecycle.ApplicationLifecycleMonitor | +
Interface for tests to use when they need to be informed of the application lifecycle state. +
+ Retrieve instances of the monitor thru ApplicationLifecycleMonitorRegistry. +
++ Detecting these lifecycle states requires support from Instrumentation, therefore do not expect + an instance to be present under any arbitrary instrumentation. +
+ + + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Adds a new callback that will be notified when lifecycle changes occur.
+
+
+
+
+
+ | |||||||||||
+ Removes a previously registered lifecycle callback.
+
+
+
+
+
+ |
Adds a new callback that will be notified when lifecycle changes occur. +
+ Implementors will not hold a strong ref to the callback, the code which registers callbacks + is responsible for this. Code which registers callbacks should responsibly + remove their callback when it is no longer needed. +
++ Callbacks may be executed on the main thread of the application, and should take care not to + block or otherwise perform expensive operations as it will directly impact the application. +
callback + | an ApplicationLifecycleCallback + | +
---|
Removes a previously registered lifecycle callback. +
+ About Android | + Legal | + Support +
+java.lang.Object | +|
↳ | + +android.support.test.runner.lifecycle.ApplicationLifecycleMonitorRegistry | +
An exposed registry instance to make it easy for callers to find the application lifecycle + monitor for their application. +
+ + + + + +Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ Returns the ActivityLifecycleMonitor.
+
+
+
+
+
+ | |||||||||||
+ Stores a lifecycle monitor in the registry.
+
+
+
+
+
+ |
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ |
Returns the ActivityLifecycleMonitor. + + This monitor is not guaranteed to be present under all instrumentations.
IllegalStateException + | if no monitor has been registered. + | +
---|
Stores a lifecycle monitor in the registry. +
+ This is a global registry - so be aware of the impact of calling this method! +
monitor + | the monitor for this application. Null deregisters any existing monitor. + | +
---|
+ About Android | + Legal | + Support +
+java.lang.Object | +||
↳ | + +java.lang.Enum<E extends java.lang.Enum<E>> | +|
+ + | ↳ | + +android.support.test.runner.lifecycle.ApplicationStage | +
An enumeration of the lifecycle stages an application undergoes that can be monitored. +
+ See the Application
javadoc for detailed documentation.
+
Enum Values | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ApplicationStage | +CREATED | ++ Indicates that onCreate has finished. + + + + | +|||||||||||||||||||||||||||||||
ApplicationStage | +PRE_ON_CREATE | ++ Indicates that onCreate is being called before any onCreate code executes. + + + + | +
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+ [Expand]
+ Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+
+From class
+
+ java.lang.Enum
+
+
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||
+
+From class
+
+ java.lang.Object
+
+
+
+
+
+
+
+ | |||||||||||||||||||||||||||||||||
+
+From interface
+
+ java.lang.Comparable
+
+
+
+
+
+
+
+ |
Indicates that onCreate has finished.
Indicates that onCreate is being called before any onCreate code executes.
+ About Android | + Legal | + Support +
+ActivityLifecycleMonitorRegistry | ++ An exposed registry instance to make it easy for callers to find the lifecycle monitor for their + application. + + + + | +
ApplicationLifecycleMonitorRegistry | ++ An exposed registry instance to make it easy for callers to find the application lifecycle + monitor for their application. + + + + | +
ApplicationStage | ++ An enumeration of the lifecycle stages an application undergoes that can be monitored. + + + + | +||||||||||||||||||||||||||||||
Stage |
An enumeration of the lifecycle stages an activity undergoes.
diff --git a/docs/html/reference/android/support/test/runner/package-summary.html b/docs/html/reference/android/support/test/runner/package-summary.html
index 82d6cf0850b..f3a110d2794 100644
--- a/docs/html/reference/android/support/test/runner/package-summary.html
+++ b/docs/html/reference/android/support/test/runner/package-summary.html
@@ -93,6 +93,7 @@
+
@@ -110,7 +111,7 @@
href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
-
+
@@ -126,7 +127,9 @@ type="text/css">
var metaTags = [];
var devsite = false;
-
+
+
+
+
|
+
+ Dump the current window hierarchy to a
+
+ File .
+
+
+
+ | |||||||||||||||||||||||||||||
- Helper method used for debugging to dump the current window's layout hierarchy.
+
+ This method is deprecated.
+ Use
+
+ dumpWindowHierarchy(File) or
+ dumpWindowHierarchy(OutputStream) instead.
+
+
+
+
+ | |||||||||||||||||||||||||||||||
+ Dump the current window hierarchy to an OutputStream .
@@ -1176,6 +1264,29 @@ Summary:
+ String
+ |
+
+ Retrieves default launcher package name
+
+
+
+
+
+ | ||||||||||||||||||||||||||||||