diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/UiComponent.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/UiComponent.kt index d386e835035b..0744fee4b846 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/UiComponent.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/UiComponent.kt @@ -409,13 +409,13 @@ open class UiComponent(private val data: ComponentData) : Finder, WithKeyboard { } // Mouse - fun click(point: Point? = null) { + fun click(point: Point? = null, mouseButton: RemoteMouseButton = RemoteMouseButton.LEFT) { LOG.info("Click at $this${point?.let { ": $it" } ?: ""}") if (point != null) { - withComponent { robot.click(it, point) } + withComponent { robot.click(it, point, mouseButton) } } else { - withComponent { robot.click(it) } + withComponent { robot.click(it, mouseButton) } } } diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/remote/Robot.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/remote/Robot.kt index 6935112e40a5..7a5a71c0de9f 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/remote/Robot.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/remote/Robot.kt @@ -14,7 +14,9 @@ interface Robot { fun click(component: Component, mouseButton: RemoteMouseButton) fun click(component: Component, mouseButton: RemoteMouseButton, counts: Int) fun click(component: Component, point: Point) + fun click(point: Point, button: RemoteMouseButton) fun click(point: Point, button: RemoteMouseButton, times: Int) + fun click(component: Component, point: Point, button: RemoteMouseButton) fun click(component: Component, point: Point, button: RemoteMouseButton, times: Int) fun pressAndReleaseKey(keyCode: Int, vararg modifiers: Int) fun pressModifiers(modifierMask: Int) diff --git a/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/robot/SmoothRobot.kt b/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/robot/SmoothRobot.kt index a9607b82bf41..25bd57ac4077 100644 --- a/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/robot/SmoothRobot.kt +++ b/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/robot/SmoothRobot.kt @@ -109,6 +109,14 @@ internal class SmoothRobot @JvmOverloads constructor( click(c, where, button.toAssertJ(), times) } + fun click(c: Component, where: Point, button: RemoteMouseButton) { + click(c, where, button.toAssertJ(), 1) + } + + fun click(where: Point, button: RemoteMouseButton) { + click(where, button.toAssertJ(), 1) + } + fun click(where: Point, button: RemoteMouseButton, times: Int) { click(where, button.toAssertJ(), times) }