Web

public final class Web
extends Object

java.lang.Object
   ↳ android.support.test.espresso.web.sugar.Web


在Android上使用WebViews的入口点。

与onData类似,WebView交互实际上由几个ViewActions组成。 但是他们需要适当的协调,而且非常冗长。 Web和WebInteraction包装这个样板,并给Espresso感觉像与WebViews交互。

WebView交互不断通过Java / Javascript边界来完成他们的工作,因为通过从Javascript环境暴露数据(我们在Java端看到的所有内容都是独立副本)没有机会引入竞争条件,从WebInteractions返回的数据是完全的支持的。

Summary

Nested classes

class Web.WebInteraction<R>

类似于ViewInteraction或DataInteraction,WebInteraction将流畅的API暴露给底层的WebView。

Public constructors

Web()

Public methods

static WebInteraction<Void> onWebView()
static WebInteraction<Void> onWebView(Matcher<View> viewMatcher)

Inherited methods

From class java.lang.Object

Public constructors

Web

Web ()

Public methods

onWebView

WebInteraction<Void> onWebView ()

Returns
WebInteraction<Void>

onWebView

WebInteraction<Void> onWebView (Matcher<View> viewMatcher)

Parameters
viewMatcher Matcher
Returns
WebInteraction<Void>