The receiver scope of the mouse input injection lambda from [performMouseInput].
fun mouseInputClick() {
composeTestRule.onNodeWithTag("myComponent").performMouseInput {
// Click in the middle of the node
click(center)
}
}
fun mouseInputScrollWhileDown() {
composeTestRule
.onNodeWithTag("verticalScrollable")
// Scroll downwards while keeping a button pressed:
.performMouseInput {
// Presses the primary mouse button
press()
// Scroll the scroll wheel by 6 units
repeat(6) {
advanceEventTime()
scroll(1f)
}
// And release the mouse button
advanceEventTime()
release()
}
}