2
用Espresso可以簡化這兩個陳述嗎?查看AlertDialog的標題和信息
onView(withText(expectedErrorTitle))
.check(matches(isDisplayed()));
onView(withText(expectedErrorMessage))
.check(matches(isDisplayed()));
我想這一個,但它不工作:
onView(allOf(
withText(expectedErrorTitle),
withText(expectedErrorMessage)
)).check(matches(isDisplayed()));