public final class ViewAssertions
extends Object
| java.lang.Object | |
| ↳ | android.support.test.espresso.assertion.ViewAssertions |
共同的 ViewAssertion s的集合。
Public methods |
|
|---|---|
static ViewAssertion |
doesNotExist() 返回一个断言,确保视图匹配器在层次结构中找不到任何匹配的视图。 |
static ViewAssertion |
matches(Matcher<? super View> viewMatcher) 返回一个通用的 |
static ViewAssertion |
selectedDescendantsMatch(Matcher<View> selector, Matcher<View> matcher) 返回声明由选择器选择的后代视图匹配指定的匹配器的通用 |
Inherited methods |
|
|---|---|
java.lang.Object
|
|
ViewAssertion matches (Matcher<? super View> viewMatcher)
返回一个通用的 ViewAssertion ,声明视图存在于视图层次结构中,并与给定的视图匹配器匹配。
| Parameters | |
|---|---|
viewMatcher |
Matcher
|
| Returns | |
|---|---|
ViewAssertion |
|
ViewAssertion selectedDescendantsMatch (Matcher<View> selector, Matcher<View> matcher)
返回一个通用的ViewAssertion ,声明由选择器选择的后代视图匹配指定的匹配器。 示例:onView(rootView).check(selectedDescendantsMatch(not(isAssignableFrom(TextView.class)),hasContentDescription()));
| Parameters | |
|---|---|
selector |
Matcher
|
matcher |
Matcher
|
| Returns | |
|---|---|
ViewAssertion |
|