{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class InteractionRequest.Builder
Creates an instance of InteractionRequest from a View matcher and action.
Public functions |
|
|---|---|
InteractionRequest! |
build()Builds an |
InteractionRequest.Builder! |
setRequestProto(protoByteArray: ByteArray!)Set the result proto as a byte array. |
InteractionRequest.Builder! |
setRootMatcher(rootMatcher: Matcher<Root>!)Sets the root matcher for this |
InteractionRequest.Builder! |
setViewAction(viewAction: ViewAction!)Sets the |
InteractionRequest.Builder! |
setViewAssertion(viewAssertion: ViewAssertion!)Sets the |
InteractionRequest.Builder! |
setViewMatcher(viewMatcher: Matcher<View>!)Sets the view matcher for this |
fun build(): InteractionRequest!
Builds an InteractionRequest object.
| Returns | |
|---|---|
InteractionRequest! |
an |
| Throws | |
|---|---|
java.lang.IllegalStateException: java.lang.IllegalStateException |
when conflicting properties are set. You can either set a < and a |
androidx.test.espresso.remote.RemoteProtocolException: androidx.test.espresso.remote.RemoteProtocolException |
when the provided proto byte array cannot be parsed into a protocol buffer of type InteractionRequestProto |
fun setRequestProto(protoByteArray: ByteArray!): InteractionRequest.Builder!
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 build method is called!
| Parameters | |
|---|---|
protoByteArray: ByteArray! |
the proto byte array to set |
| Returns | |
|---|---|
InteractionRequest.Builder! |
fluent interface |
fun setRootMatcher(rootMatcher: Matcher<Root>!): InteractionRequest.Builder!
Sets the root matcher for this InteractionRequest
| Parameters | |
|---|---|
rootMatcher: Matcher<Root>! |
the root matcher to set |
| Returns | |
|---|---|
InteractionRequest.Builder! |
fluent interface |
| See also | |
|---|---|
Root |
|
fun setViewAction(viewAction: ViewAction!): InteractionRequest.Builder!
Sets the ViewAction for this InteractionRequest
| Parameters | |
|---|---|
viewAction: ViewAction! |
the view action to set |
| Returns | |
|---|---|
InteractionRequest.Builder! |
fluent interface |
| Throws | |
|---|---|
java.lang.IllegalStateException: java.lang.IllegalStateException |
if a |
fun setViewAssertion(viewAssertion: ViewAssertion!): InteractionRequest.Builder!
Sets the ViewAssertion for this InteractionRequest
| Parameters | |
|---|---|
viewAssertion: ViewAssertion! |
the view action to set |
| Returns | |
|---|---|
InteractionRequest.Builder! |
fluent interface |
| Throws | |
|---|---|
java.lang.IllegalStateException: java.lang.IllegalStateException |
if a |
fun setViewMatcher(viewMatcher: Matcher<View>!): InteractionRequest.Builder!
Sets the view matcher for this InteractionRequest
| Parameters | |
|---|---|
viewMatcher: Matcher<View>! |
the view matcher to set |
| Returns | |
|---|---|
InteractionRequest.Builder! |
fluent interface |