From 79b88e2c013a699d14bc9e7ffb5c67e72bbf410d Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Thu, 13 Jul 2017 07:46:32 +0700 Subject: [PATCH] Fixing last commit --- input.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input.go b/input.go index 3a9c3d9..91b0339 100644 --- a/input.go +++ b/input.go @@ -13,7 +13,7 @@ import ( // MouseAction is a mouse action. func MouseAction(typ input.MouseType, x, y int64, opts ...MouseOption) Action { - me := input.DispatchMouseEvent(typ, x, y) + me := input.DispatchMouseEvent(typ, float64(x), float64(y)) // apply opts for _, o := range opts { @@ -29,8 +29,8 @@ func MouseClickXY(x, y int64, opts ...MouseOption) Action { return ActionFunc(func(ctxt context.Context, h cdp.Handler) error { me := &input.DispatchMouseEventParams{ Type: input.MousePressed, - X: x, - Y: y, + X: float64(x), + Y: float64(y), Button: input.ButtonLeft, ClickCount: 1, }