dispatch Mouse Click
suspend fun InputDomain.dispatchMouseClick(x: Double, y: Double, clickDuration: Duration = 100.milliseconds, button: MouseButton = MouseButton.left)(source)
Simulates a mouse click on the given x and y coordinates. This uses a mousePressed and mouseReleased event in quick succession.
The current tab doesn't need to be focused. If this click opens a new tab, that new tab may become focused, but this session still targets the old tab.
suspend fun InputDomain.dispatchMouseClick(x: Double, y: Double, clickDurationMillis: Long, button: MouseButton = MouseButton.left)(source)
Deprecated
Use dispatchMouseClick with a Duration type for clickDuration.
Replace with
import kotlin.time.Duration.Companion.milliseconds
Content copied to clipboard
this.dispatchMouseClick(x, y, clickDurationMillis.milliseconds, button)Content copied to clipboard
Simulates a mouse click on the given x and y coordinates. This uses a mousePressed and mouseReleased event in quick succession.
The current tab doesn't need to be focused. If this click opens a new tab, that new tab may become focused, but this session still targets the old tab.