Web
  public
  
  final
  
  class
  Web
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.support.test.espresso.web.sugar.Web | 
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<R>Analogous to a ViewInteraction or a DataInteraction, a WebInteraction exposes a fluent API to the underlying 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 (Matcher<View> viewMatcher)
| Parameters | |
|---|---|
| viewMatcher | Matcher | 
| Returns | |
|---|---|
| WebInteraction<Void> | |
- Classes
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
