public class

InteractionRequest.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.test.espresso.remote.InteractionRequest.Builder

Overview

Creates an instance of InteractionRequest from a View matcher and action.

Summary

Constructors
publicBuilder()

Creates a new InteractionRequest.Builder instance.

Methods
public InteractionRequestbuild()

Builds an InteractionRequest object.

public InteractionRequest.BuildersetRequestProto(byte[] protoByteArray[])

Set the result proto as a byte array.

public InteractionRequest.BuildersetRootMatcher(<any> rootMatcher)

Sets the root matcher for this InteractionRequest

public InteractionRequest.BuildersetViewAction(ViewAction viewAction)

Sets the ViewAction for this InteractionRequest

public InteractionRequest.BuildersetViewAssertion(ViewAssertion viewAssertion)

Sets the ViewAssertion for this InteractionRequest

public InteractionRequest.BuildersetViewMatcher(<any> viewMatcher)

Sets the view matcher for this InteractionRequest

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a new InteractionRequest.Builder instance.

Methods

public InteractionRequest.Builder setRootMatcher(<any> rootMatcher)

Sets the root matcher for this InteractionRequest

Parameters:

rootMatcher: the root matcher to set

Returns:

fluent interface

See also: Root

public InteractionRequest.Builder setViewMatcher(<any> viewMatcher)

Sets the view matcher for this InteractionRequest

Parameters:

viewMatcher: the view matcher to set

Returns:

fluent interface

public InteractionRequest.Builder setViewAction(ViewAction viewAction)

Sets the ViewAction for this InteractionRequest

Parameters:

viewAction: the view action to set

Returns:

fluent interface

public InteractionRequest.Builder setViewAssertion(ViewAssertion viewAssertion)

Sets the ViewAssertion for this InteractionRequest

Parameters:

viewAssertion: the view action to set

Returns:

fluent interface

public InteractionRequest.Builder setRequestProto(byte[] protoByteArray[])

Set the result proto as a byte array. This byte array will be parsed into an . Providing an invalid byte array will result in a RemoteProtocolException when the InteractionRequest.Builder.build() method is called!

Parameters:

protoByteArray: the proto byte array to set

Returns:

fluent interface InteractionRequest.Builder

public InteractionRequest build()

Builds an InteractionRequest object.

Returns:

an InteractionRequest object.