| java.lang.Object | |
| ↳ | androidx.test.espresso.remote.InteractionRequest.Builder |
Creates an instance of InteractionRequest from a View matcher and action.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
InteractionRequest.Builder instance. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Builds an
InteractionRequest object. | |||||||||||
Set the result proto as a byte array.
| |||||||||||
Sets the root matcher for this
InteractionRequest | |||||||||||
Sets the
ViewAction for this InteractionRequest | |||||||||||
Sets the
ViewAssertion for this InteractionRequest | |||||||||||
Sets the view matcher for this
InteractionRequest | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
Builds an InteractionRequest object.
| Returns | |
|---|---|
InteractionRequest |
an InteractionRequest object. |
| Throws | |
|---|---|
IllegalStateException |
when conflicting properties are set. You can either set a
ERROR(/Matcher and a ViewAction or 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 ERROR(/InteractionRequestProto)
|
Set the result proto as a byte array. This byte array will be parsed into an ERROR(/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
|
Sets the root matcher for this InteractionRequest
| Parameters | |
|---|---|
rootMatcher |
Matcher: the root matcher to set |
| Returns | |
|---|---|
InteractionRequest.Builder |
fluent interface |
See also:
Sets the ViewAction for this InteractionRequest
| Parameters | |
|---|---|
viewAction |
ViewAction: the view action to set |
| Returns | |
|---|---|
InteractionRequest.Builder |
fluent interface |
| Throws | |
|---|---|
IllegalStateException |
if a ViewAssertion was already set through setViewAssertion(ViewAssertion) before. InteractionRequest supports only one of ViewAction or ViewAssertion, but
not both.
|
Sets the ViewAssertion for this InteractionRequest
| Parameters | |
|---|---|
viewAssertion |
ViewAssertion: the view action to set |
| Returns | |
|---|---|
InteractionRequest.Builder |
fluent interface |
| Throws | |
|---|---|
IllegalStateException |
if a ViewAction was already set through setViewAction(ViewAction) before. InteractionRequest
supports only one of ViewAction or ViewAssertion, but not both.
|
Sets the view matcher for this InteractionRequest
| Parameters | |
|---|---|
viewMatcher |
Matcher: the view matcher to set |
| Returns | |
|---|---|
InteractionRequest.Builder |
fluent interface |