InteractionRequest.Builder
  public
  static
  
  
  class
  InteractionRequest.Builder
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.support.test.espresso.remote.InteractionRequest.Builder | 
Creates an instance of InteractionRequest from a View matcher and action.
Summary
| Public constructors | |
|---|---|
| 
      InteractionRequest.Builder()
      Creates a new  | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        InteractionRequest | 
      build()
      Builds an  | 
| 
        
        
        
        
        
        InteractionRequest.Builder | 
      setRequestProto(byte[] protoByteArray)
      Set the result proto as a byte array. | 
| 
        
        
        
        
        
        InteractionRequest.Builder | 
      setRootMatcher(Matcher<Root> rootMatcher)
      Sets the root matcher for this  | 
| 
        
        
        
        
        
        InteractionRequest.Builder | 
      setViewAction(ViewAction viewAction)
      Sets the  | 
| 
        
        
        
        
        
        InteractionRequest.Builder | 
      setViewAssertion(ViewAssertion viewAssertion)
      Sets the  | 
| 
        
        
        
        
        
        InteractionRequest.Builder | 
      setViewMatcher(Matcher<View> viewMatcher)
      Sets the view matcher for this  | 
| Inherited methods | |
|---|---|
|  From
class 
  
    java.lang.Object
  
 | |
Public constructors
InteractionRequest.Builder
InteractionRequest.Builder ()
Creates a new InteractionRequest.Builder instance. 
Public methods
build
InteractionRequest build ()
Builds an InteractionRequest object.
| Returns | |
|---|---|
| InteractionRequest | an InteractionRequestobject. | 
| Throws | |
|---|---|
| IllegalStateException | when conflicting properties are set. You can either set a ERROR(/Matcherand aViewActionor set the proto byte array but not both.
     Setting all values would result in an override, therefore setting both properties will
     result in an exception. | 
| RemoteProtocolException | when the provided proto byte array cannot be parsed into a
     protocol buffer of type UiInteraction.InteractionRequestProto | 
setRequestProto
InteractionRequest.Builder setRequestProto (byte[] protoByteArray)
Set the result proto as a byte array. This byte array will be parsed into an UiInteraction.InteractionRequestProto. Providing an invalid byte array will result in a RemoteProtocolException when the build() method is called!
| Parameters | |
|---|---|
| protoByteArray | byte: the proto byte array to set | 
| Returns | |
|---|---|
| InteractionRequest.Builder | fluent interface InteractionRequest.Builder | 
setRootMatcher
InteractionRequest.Builder setRootMatcher (Matcher<Root> rootMatcher)
Sets the root matcher for this InteractionRequest
| Parameters | |
|---|---|
| rootMatcher | Matcher: the root matcher to set | 
| Returns | |
|---|---|
| InteractionRequest.Builder | fluent interface | 
See also:
setViewAction
InteractionRequest.Builder setViewAction (ViewAction viewAction)
Sets the ViewAction for this InteractionRequest
| Parameters | |
|---|---|
| viewAction | ViewAction: the view action to set | 
| Returns | |
|---|---|
| InteractionRequest.Builder | fluent interface | 
| Throws | |
|---|---|
| IllegalStateException | if a ViewAssertionwas already set throughsetViewAssertion(ViewAssertion)before.InteractionRequestsupports only one ofViewActionorViewAssertion, but
     not both. | 
setViewAssertion
InteractionRequest.Builder setViewAssertion (ViewAssertion viewAssertion)
Sets the ViewAssertion for this InteractionRequest
| Parameters | |
|---|---|
| viewAssertion | ViewAssertion: the view action to set | 
| Returns | |
|---|---|
| InteractionRequest.Builder | fluent interface | 
| Throws | |
|---|---|
| IllegalStateException | if a ViewActionwas already set throughsetViewAction(ViewAction)before.InteractionRequestsupports only one ofViewActionorViewAssertion, but not both. | 
setViewMatcher
InteractionRequest.Builder setViewMatcher (Matcher<View> viewMatcher)
Sets the view matcher for this InteractionRequest
| Parameters | |
|---|---|
| viewMatcher | Matcher: the view matcher to set | 
| Returns | |
|---|---|
| InteractionRequest.Builder | fluent interface | 
- Interfaces
- Classes- ConstructorInvocation
- EspressoRemote
- FieldDescriptor
- GenericRemoteMessage
- InteractionRequest
- InteractionRequest.Builder
- InteractionResponse
- InteractionResponse.Builder
- InteractionResponse.RemoteError
- NoopRemoteInteraction
- ProtoUtils
- RemoteDescriptor
- RemoteDescriptor.Builder
- RemoteDescriptorRegistry
- RemoteInteractionRegistry
- TypeProtoConverters
 
- Enums
- Exceptions
