-
AndroidComposeUiTestEnvironment
Creates an AndroidComposeUiTestEnvironment that retrieves the host ActivityAndroidComposeUiTest.activity by delegating to the given activityProvider.
- AndroidComposeUiTestEnvironmentNoSuspendingLambda
-
DarkMode
A DeviceConfigurationOverride that overrides the dark mode or light mode theme for the contained content.
- FontScale
-
FontWeightAdjustment
A DeviceConfigurationOverride that overrides the font weight adjustment for the contained content.
- ForcedSize
-
Keyboard
A DeviceConfigurationOverride that overrides the current keyboard type.
- LayoutDirection
-
Locales
A DeviceConfigurationOverride that overrides the locales for the contained content.
-
Navigation
A DeviceConfigurationOverride that overrides the current navigation type and whether it is hidden.
-
RoundScreen
A DeviceConfigurationOverride that overrides whether the screen is round for the contained content.
-
Touchscreen
A DeviceConfigurationOverride that overrides the current touchscreen type.
-
UiMode
A DeviceConfigurationOverride that overrides the current ui mode type.
-
WindowInsets
A DeviceConfigurationOverride that overrides the window insets for the contained content.
- WindowSize
-
addGlobalAssertion
Adds a named assertion to the collection of assertions to be executed before test actions.
-
advanceEventTime
Adds the given durationMillis to the current event time, delaying the next event by that time.
-
animateMoveAlong
Move the mouse along the given curve, sending a stream of move events to get an animated path of durationMillis milliseconds.
-
animateMoveBy
Move the mouse from the current positionMouseInjectionScope.currentPosition by the given delta, sending a stream of move events to get an animated path of durationMillis milliseco…
-
animateMoveTo
Move the mouse from the current positionMouseInjectionScope.currentPosition to the given position, sending a stream of move events to get an animated path of durationMillis millis…
-
assert
Asserts that the provided matcher is satisfied for this node.
-
assertAll
Asserts that all the nodes in this collection satisfy the given matcher.
-
assertAny
Asserts that this collection contains at least one element that satisfies the given matcher.
-
assertContentDescriptionContains
Asserts that the node's list of content descriptions contains the given value.
-
assertContentDescriptionEquals
Asserts that the node's list of content descriptions contains exactly the given values and nothing else.
-
assertCountEquals
Asserts that this collection of nodes is equal to the given expectedSize.
-
assertHasClickAction
Asserts that the current semantics node has a click action.
-
assertHasNoClickAction
Asserts that the current semantics node has doesn't have a click action.
-
assertHeightIsAtLeast
Asserts that the layout of this node has height that is greater than or equal to expectedMinHeight.
-
assertHeightIsEqualTo
Asserts that the layout of this node has height equal to expectedHeight.
-
assertIsDisplayed
Asserts that the current semantics node is displayed on screen.
-
assertIsEnabled
Asserts that the current semantics node is enabled.
-
assertIsEqualTo
Asserts that this value is equal to the given expected value.
-
assertIsFocused
Asserts that the current semantics node has a focus.
-
assertIsNotDisplayed
Asserts that the current semantics node is not displayed on screen, including when the node is not composed, composed but not placed, or when none of its bounds are visible on scr…
-
assertIsNotEnabled
Asserts that the current semantics node is not enabled.
-
assertIsNotFocused
Asserts that the current semantics node does not have a focus.
-
assertIsNotSelected
Asserts that the current semantics node is not selected.
-
assertIsOff
Asserts that the current semantics node is unchecked.
-
assertIsOn
Asserts that the current semantics node is checked.
-
assertIsSelectable
Asserts that the current semantics node is selectable.
-
assertIsSelected
Asserts that the current semantics node is selected.
-
assertIsToggleable
Asserts that the current semantics node is toggleable.
-
assertLeftPositionInRootIsEqualTo
Asserts that the layout of this node has the left position in the root composable that is equal to the given position.
-
assertPositionInRootIsEqualTo
Asserts that the layout of this node has position in the root composable that is equal to the given position.
-
assertRangeInfoEquals
Asserts the node's range info equals the given value.
-
assertTextContains
Asserts that the node's list of text values contains the given value.
-
assertTextEquals
Asserts that the node's list of text values contains exactly the given values and nothing else.
-
assertTopPositionInRootIsEqualTo
Asserts that the layout of this node has the top position in the root composable that is equal to the given position.
-
assertTouchHeightIsEqualTo
Asserts that the touch bounds of this node has height equal to expectedHeight.
-
assertTouchWidthIsEqualTo
Asserts that the touch bounds of this node has width equal to expectedWidth.
-
assertValueEquals
Asserts the node's value equals the given value.
-
assertWidthIsAtLeast
Asserts that the layout of this node has width that is greater than or equal to expectedMinWidth.
-
assertWidthIsEqualTo
Asserts that the layout of this node has width equal to expectedWidth.
-
cancel
Sends a cancel event to cancel the current gesture.
-
captureToImage
Captures the underlying semantics node's surface into an ImageBitmap.
-
click
Performs a click gesture at the given position on the associated node, or in the center if the position is omitted.
- constructMetaState
-
doubleClick
Performs a double click gesture at the given position on the associated node, or in the center if the position is omitted.
-
down
Sends a down event for the pointer with the given pointerId at position on the associated node.
-
dragAndDrop
Use button to drag and drop something from start to end in durationMillis milliseconds.
- enqueueCancel
- enqueueDown
- enqueueIndirectCancel
- enqueueIndirectDown
- enqueueIndirectMove
- enqueueIndirectMoves
- enqueueIndirectPointerDown
- enqueueIndirectUp
- enqueueMouseCancel
- enqueueMouseEnter
- enqueueMouseExit
- enqueueMouseMove
- enqueueMousePress
- enqueueMouseRelease
- enqueueMouseScroll
- enqueueMove
- enqueueMoves
- enqueueRotaryScrollHorizontally
- enqueueRotaryScrollVertically
- enqueueTrackpadCancel
- enqueueTrackpadEnter
- enqueueTrackpadExit
- enqueueTrackpadMove
- enqueueTrackpadPanEnd
- enqueueTrackpadPanMove
- enqueueTrackpadPanStart
- enqueueTrackpadPress
- enqueueTrackpadRelease
- enqueueTrackpadScaleChange
- enqueueTrackpadScaleEnd
- enqueueTrackpadScaleStart
- enqueueUp
-
filter
Returns all the nodes matching the given matcher.
-
filterToOne
Expects to return exactly one node matching the given matcher.
- flush
-
getAlignmentLinePosition
Returns the position of an alignment lineAlignmentLine, or Dp.Unspecified if the line is not provided.
-
getBoundsInRoot
Returns the bounds of the layout of this node as clipped to the root.
-
getFirstLinkBounds
Returns the bounds of the first link matching the predicate, or if that link spans multiple lines, returns the bounds of the first line of the link.
-
getUnclippedBoundsInRoot
Returns the bounds of the layout of this node.
-
hasAnyAncestor
Returns whether the node has at least one ancestor that satisfies the given matcher.
-
hasAnyChild
Returns whether the node has at least one child that satisfies the given matcher.
-
hasAnyDescendant
Returns whether the node has at least one descendant that satisfies the given matcher.
-
hasAnySibling
Returns whether the node has at least one sibling that satisfies the given matcher.
-
hasClickAction
Return whether the node has a semantics click action defined.
-
hasContentDescription
Returns whether the node's content description contains the given value.
-
hasContentDescriptionExactly
Returns whether the node's content description contains exactly the given values and nothing else.
-
hasImeAction
Returns whether the node defines the given IME action.
-
hasInsertTextAtCursorAction
Returns whether the node defines a semantics action to insert text on it.
-
hasNoClickAction
Return whether the node has no semantics click action defined.
-
hasNoScrollAction
Return whether the node has no semantics scrollable action defined.
-
hasParent
Returns whether the node's parent satisfies the given matcher.
-
hasPerformImeAction
Returns whether the node defines a semantics action to perform the IME actionSemanticsProperties.ImeAction on it.
-
hasProgressBarRangeInfo
Returns whether the node's range info matches exactly to the given accessibility range info.
-
hasRequestFocusAction
Returns whether the node defines a semantics action to request focus.
-
hasScrollAction
Return whether the node has a semantics scrollable action defined.
-
hasScrollToIndexAction
Returns whether the node defines the ability to scroll to an item index.
-
hasScrollToKeyAction
Returns whether the node defines the ability to scroll to an item identified by a key, such as LazyColumnandroidx.compose.foundation.lazy.LazyColumn or LazyRowandroidx.compose.fou…
-
hasScrollToNodeAction
Returns whether the node defines the ability to scroll to content identified by a matcher.
-
hasSetTextAction
Returns whether the node defines a semantics action to set text on it.
-
hasStateDescription
Returns whether the node's value matches exactly to the given accessibility value.
-
hasTestTag
Returns whether the node is annotated by the given test tag.
-
hasText
Returns whether the node's text contains the given text.
-
hasTextExactly
Returns whether the node's text contains exactly the given textValues and nothing else.
- indirectPointer
-
invokeGlobalAssertions
Executes all of the assertions registered by addGlobalAssertion.
-
isDialog
Returns whether the node is a dialog.
-
isDisplayed
Returns true if the matched node is displayed on screen.
-
isEditable
Returns whether the node is editable.
-
isEnabled
Returns whether the node is enabled.
-
isFocusable
Return whether the node is able to receive focus
-
isFocused
Returns whether the node is focused.
-
isHeading
Returns whether the node is marked as an accessibility header.
-
isHiddenFromAccessibility
Returns whether the node is hidden from accessibility.
-
isIdlingResourceSupported
Capability query to determine if the current ComposeUiTest implementation supports registering an IdlingResource.
-
isNotDisplayed
Returns true if the matched node is not displayed on screen, including when the node is not composed, composed but not placed, or when none of its bounds are visible on screen aft…
-
isNotEnabled
Returns whether the node is not enabled.
-
isNotFocusable
Return whether the node is not able to receive focus.
-
isNotFocused
Returns whether the node is not focused.
-
isNotSelected
Returns whether the node is not selected.
-
isOff
Returns whether the node is not toggled.
-
isOn
Returns whether the node is toggled.
-
isPopup
Returns whether the node is a popup.
-
isRoot
Return whether the node is the root semantics node.
-
isSelectable
Return whether the node is selectable.
-
isSelected
Returns whether the node is selected.
-
isToggleable
Return whether the node is checkable.
- key
-
longClick
Performs a long click gesture at the given position on the associated node, or in the center if the position is omitted.
- mouse
-
move
Sends a move event without updating any of the pointer positions.
-
moveBy
Sends a move event on the associated node, with the position of the pointer with the given pointerId moved by the given delta.
-
movePointerBy
Moves the position of the pointer with the given pointerId by the given delta, but does not send a move event.
-
movePointerTo
Updates the position of the pointer with the given pointerId to the given position, but does not send a move event.
-
moveTo
Sends a move event on the associated node, with the position of the pointer with the given pointerId updated to position.
-
multiTouchSwipe
Performs a multitouch swipe gesture on nodes in the focus path.
-
onAllNodesWithContentDescription
Finds all semantics nodes with the given label as content description.
-
onAllNodesWithTag
Finds all semantics nodes identified by the given tag.
-
onAllNodesWithText
Finds all semantics nodes with the given text.
-
onAncestors
Returns all the ancestors of this node.
-
onChild
Returns exactly one child of this node.
-
onChildAt
Returns child of this node at the given index.
-
onChildren
Returns children of this node at the moment of invocation, it only captures nodes that are currently present in the semantic tree.
-
onDescendants
Returns all the descendants of this node in Depth-First Search order.
- onDispose
-
onFirst
Returns the first node in this collection.
-
onLast
Returns the last node in this collection.
-
onNodeWithContentDescription
Finds a semantics node with the given content description.
-
onNodeWithTag
Finds a semantics node identified by the given tag.
-
onNodeWithText
Finds a semantics node with the given text.
-
onParent
Returns a parent of this node.
-
onRoot
Finds the root semantics node of the Compose tree.
-
onRootWithViewInteraction
Scopes Compose interactions to the View hierarchy matched by an Espresso ViewInteraction.
-
onSibling
Returns exactly one sibling of this node.
-
onSiblings
Returns all siblings of this node.
-
pan
Sends a pan gesture with the given total offset.
-
panWithVelocity
Performs a pan gesture on the associated node such that it ends with the given endVelocity.
-
percentOffset
Creates an Offset relative to the size of the node we're interacting with.
-
performClick
Performs a click action on the element represented by the given semantics node.
-
performCustomAccessibilityActionWithLabel
Finds the CustomAccessibilityAction in the node's CustomActions list whose label is equal to label and then invokes it.
-
performCustomAccessibilityActionWithLabelMatching
Finds the CustomAccessibilityAction in the node's CustomActions list whose label satisfies a predicate function and then invokes it.
-
performFirstLinkClick
For a first link matching the predicate performs a click on it.
-
performGesture
Executes the (partial) gesture specified in the given block.
-
performImeAction
Sends to this node the IME action associated with it in a similar way to the IME.
-
performKeyInput
Executes the key input gesture specified in the given block.
-
performKeyPress
Send the specified KeyEvent to the focused component.
-
performMouseInput
Executes the mouse gesture specified in the given block.
-
performMultiModalInput
Executes the multi-modal gesture specified in the given block.
-
performRotaryScrollInput
Executes the rotary input specified in the given block.
-
performScrollTo
Scrolls the closest enclosing scroll parent by the smallest amount such that this node is fully visible in its viewport.
-
performScrollToIndex
Scrolls a scrollable container with items to the item with the given index.
-
performScrollToKey
Scrolls a scrollable container with keyed items to the item with the given key, such as LazyColumnandroidx.compose.foundation.lazy.LazyColumn or LazyRowandroidx.compose.foundation…
-
performScrollToNode
Scrolls a scrollable container to the content that matches the given matcher.
-
performSemanticsAction
Provides support to call custom semantics actions on this node.
- performSemanticsActionUnit
-
performTextClearance
Clears the text in this node in similar way to IME.
-
performTextInput
Sends the given text to this node in similar way to IME.
-
performTextInputSelection
Sends the given selection to this node in similar way to IME.
-
performTextReplacement
Replaces existing text with the given text in this node in similar way to IME.
-
performTouchInput
Executes the touch gesture specified in the given block.
-
performTrackpadInput
Executes the trackpad gesture specified in the given block.
-
pinch
Performs a pinch gesture on the associated node.
-
pressKey
Holds down the given key for the given pressDurationMillis by sending a key down event, advancing the event time and sending a key up event.
-
printToLog
Prints all the semantics nodes information into logs (as debug level).
-
printToString
Prints all the semantics nodes information it holds into string.
-
registerIdlingResource
Attempts to register an IdlingResource in this test.
-
removeGlobalAssertion
Removes a named assertion from the collection of assertions to be executed before test actions.
-
requestFocus
Requests the focus system to give focus to this node by invoking the RequestFocusSemanticsActions.RequestFocus semantics action.
-
rightClick
Secondary-click on position, or on the current mouse position if position is unspecifiedOffset.Unspecified.
- rotary
-
runAndroidComposeUiTest
Variant of runComposeUiTest that allows you to specify which Activity should be launched.
- runAndroidComposeUiTestNonSuspendingLambda
-
runComposeUiTest
Sets up the test environment, runs the given testblock and then tears down the test environment.
- runComposeUiTestNonSuspendingLambda
-
runEmptyComposeUiTest
Variant of runComposeUiTest that does not launch an Activity to host Compose content in and thus acts as an "empty shell".
-
scale
Sends a scale event with the given scaleFactor.
-
sendIndirectPointerInput
Sends an indirect pointer gesture globally, targeting the currently focused Compose UI (from root to the focused node).
-
smoothScroll
Rotate the mouse's scrollWheel by the given scrollAmount.
-
swipe
Performs the swipe gesture on the associated node.
-
swipeDown
Performs a swipe down gesture along the centerX of the associated node.
-
swipeLeft
Performs a swipe left gesture along the centerY of the associated node.
-
swipeRight
Performs a swipe right gesture along the centerY of the associated node.
-
swipeUp
Performs a swipe up gesture along the centerX of the associated node.
-
swipeWithVelocity
Performs the swipe gesture on the associated node, such that the velocity when the gesture is finished is roughly equal to endVelocity.
-
then
Combines this override with the other override into a single override, by applying this override as the outer override first, then the other override as an inner override, and the…
- touch
- trackpad
-
tripleClick
Use button to triple-click on position, or on the current mouse position if position is unspecifiedOffset.Unspecified.
- tryPerformAccessibilityChecks
-
unregisterIdlingResource
Attempts to unregister an IdlingResource in this test.
-
up
Sends an up event for the pointer with the given pointerId, or the default pointer if pointerId is omitted, on the associated node.
-
waitUntilAtLeastOneExists
Blocks until at least one node matches the given matcher.
-
waitUntilDoesNotExist
Blocks until no nodes match the given matcher.
-
waitUntilExactlyOneExists
Blocks until exactly one node matches the given matcher.
-
waitUntilNodeCount
Blocks until the number of nodes matching the given matcher is equal to the given count.
-
withKeyDown
Executes the keyboard sequence specified in the given block, whilst holding down the given key.
-
withKeyToggled
Executes the keyboard sequence specified in the given block, in between presses to the given key.
-
withKeysDown
Executes the keyboard sequence specified in the given block, whilst holding down the each of the given keys.
-
withKeysToggled
Executes the keyboard sequence specified in the given block, in between presses to the given keys.
Content updated: