Compose UI Test API Reference
Installation
testImplementation("androidx.compose.ui:ui-test:1.9.0-beta02")
Composable Functions
Classes
- AndroidComposeUiTestEnvironment
- ComposeNotIdleException
- ComposeTimeoutException
- ExperimentalTestApi
- GestureScope
- InternalTestApi
- MouseButton
- ScrollWheel
- SelectionResult
- SemanticsMatcher
- SemanticsNodeInteraction
- SemanticsNodeInteractionCollection
- SemanticsSelector
- StateRestorationTester
- TestContext
- TestMonotonicFrameClock
Interfaces
- AndroidComposeUiTest
- ComposeUiTest
- DeviceConfigurationOverride
- IdlingResource
- InjectionScope
- KeyInjectionScope
- MainTestClock
- MouseInjectionScope
- MultiModalInjectionScope
- RotaryInjectionScope
- SemanticsNodeInteractionsProvider
- TouchInjectionScope
Properties
- bottom
- bottomCenter
- bottomLeft
- bottomRight
- center
- centerLeft
- centerRight
- centerX
- centerY
- frameDelayMillis
- height
- isAltDown
- isCtrlDown
- isFnDown
- isMetaDown
- isShiftDown
- left
- right
- top
- topCenter
- topLeft
- topRight
- width
Functions
- addGlobalAssertion
- advanceEventTime
- AndroidComposeUiTestEnvironment
- AndroidComposeUiTestEnvironmentNoSuspendingLambda
- animateMoveAlong
- animateMoveBy
- animateMoveTo
- assert
- assertAll
- assertAny
- assertContentDescriptionContains
- assertContentDescriptionEquals
- assertCountEquals
- assertHasClickAction
- assertHasNoClickAction
- assertHeightIsAtLeast
- assertHeightIsEqualTo
- assertIsDisplayed
- assertIsEnabled
- assertIsEqualTo
- assertIsFocused
- assertIsNotDisplayed
- assertIsNotEnabled
- assertIsNotFocused
- assertIsNotSelected
- assertIsOff
- assertIsOn
- assertIsSelectable
- assertIsSelected
- assertIsToggleable
- assertLeftPositionInRootIsEqualTo
- assertPositionInRootIsEqualTo
- assertRangeInfoEquals
- assertTextContains
- assertTextEquals
- assertTopPositionInRootIsEqualTo
- assertTouchHeightIsEqualTo
- assertTouchWidthIsEqualTo
- assertValueEquals
- assertWidthIsAtLeast
- assertWidthIsEqualTo
- cancel
- captureToImage
- click
- DarkMode
- doubleClick
- down
- dragAndDrop
- filter
- filterToOne
- FontScale
- FontWeightAdjustment
- ForcedSize
- getAlignmentLinePosition
- getBoundsInRoot
- getFirstLinkBounds
- getUnclippedBoundsInRoot
- hasAnyAncestor
- hasAnyChild
- hasAnyDescendant
- hasAnySibling
- hasClickAction
- hasContentDescription
- hasContentDescriptionExactly
- hasImeAction
- hasInsertTextAtCursorAction
- hasNoClickAction
- hasNoScrollAction
- hasParent
- hasPerformImeAction
- hasProgressBarRangeInfo
- hasRequestFocusAction
- hasScrollAction
- hasScrollToIndexAction
- hasScrollToKeyAction
- hasScrollToNodeAction
- hasSetTextAction
- hasStateDescription
- hasTestTag
- hasText
- hasTextExactly
- invokeGlobalAssertions
- isDialog
- isDisplayed
- isEditable
- isEnabled
- isFocusable
- isFocused
- isHeading
- isNotDisplayed
- isNotEnabled
- isNotFocusable
- isNotFocused
- isNotSelected
- isOff
- isOn
- isPopup
- isRoot
- isSelectable
- isSelected
- isToggleable
- LayoutDirection
- Locales
- longClick
- move
- moveBy
- movePointerBy
- movePointerTo
- moveTo
- multiTouchSwipe
- onAllNodesWithContentDescription
- onAllNodesWithTag
- onAllNodesWithText
- onAncestors
- onChild
- onChildAt
- onChildren
- onFirst
- onLast
- onNodeWithContentDescription
- onNodeWithTag
- onNodeWithText
- onParent
- onRoot
- onSibling
- onSiblings
- percentOffset
- performClick
- performCustomAccessibilityActionWithLabel
- performCustomAccessibilityActionWithLabelMatching
- performFirstLinkClick
- performGesture
- performImeAction
- performIndirectTouchEvent
- performKeyInput
- performKeyPress
- performMouseInput
- performMultiModalInput
- performRotaryScrollInput
- performScrollTo
- performScrollToIndex
- performScrollToKey
- performScrollToNode
- performSemanticsAction
- performSemanticsActionUnit
- performTextClearance
- performTextInput
- performTextInputSelection
- performTextReplacement
- performTouchInput
- pinch
- pressKey
- printToLog
- printToString
- removeGlobalAssertion
- requestFocus
- rightClick
- RoundScreen
- runAndroidComposeUiTest
- runAndroidComposeUiTestNonSuspendingLambda
- runComposeUiTest
- runComposeUiTestNonSuspendingLambda
- runEmptyComposeUiTest
- smoothScroll
- swipe
- swipeDown
- swipeLeft
- swipeRight
- swipeUp
- swipeWithVelocity
- then
- tripleClick
- tryPerformAccessibilityChecks
- up
- waitUntilAtLeastOneExists
- waitUntilDoesNotExist
- waitUntilExactlyOneExists
- waitUntilNodeCount
- WindowInsets
- withKeyDown
- withKeysDown
- withKeysToggled
- withKeyToggled