# Web

Summary:[Nested Classes](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#nestedclasses)\|[Ctors](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#pubctors)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#)  

# Web

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
Web
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|---------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.web.sugar.Web |

<br />

*** ** * ** ***

An Entry Point to work with WebViews on Android.

Similar to onData, WebView interactions are actually composed of several ViewActions. However they need to be properly orchestrated and are quite verbose. Web and WebInteraction wrap this boilerplate and give an Espresso like feel to interacting with WebViews.

WebView interactions constantly cross the Java/Javascript boundary to do their work, since there is no chance of introducing race conditions by exposing data from the Javascript environment (everything we see on the Java side is an isolated copy), returning data from WebInteractions is fully supported.

## Summary

|                                                                                                                      ### Nested classes                                                                                                                       ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [Web.WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)`<R>` Analogous to a ViewInteraction or a DataInteraction, a WebInteraction exposes a fluent API to the underlying WebView. |

|                                           ### Public constructors                                           ||
|----------------------------------------------------------------------------------------------------------|---|
| ` `[Web](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#Web())`() ` |

|                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)`<`[Void](https://developer.android.com/reference/java/lang/Void.html)`>` | ` `[onWebView](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#onWebView())`() `                                                                                                                                     |
| ` static `[WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)`<`[Void](https://developer.android.com/reference/java/lang/Void.html)`>` | ` `[onWebView](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#onWebView(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> viewMatcher) ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public constructors

### Web

```
Web ()
```

<br />

<br />

## Public methods

### onWebView

```
WebInteraction<Void> onWebView ()
```

<br />

<br />

|                                                                                                Returns                                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)`<`[Void](https://developer.android.com/reference/java/lang/Void.html)`>` | <br /> |

### onWebView

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

<br />

<br />

|           Parameters            ||
|---------------|------------------|
| `viewMatcher` | `Matcher` <br /> |

|                                                                                                Returns                                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)`<`[Void](https://developer.android.com/reference/java/lang/Void.html)`>` | <br /> |

-

  ## Classes

  - [Web](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web)
  - [Web.WebInteraction](https://developer.android.com/reference/android/support/test/espresso/web/sugar/Web.WebInteraction)