Fixing last commit

This commit is contained in:
Kenneth Shaw 2017-07-13 07:46:32 +07:00
parent 7615cdd4e5
commit 79b88e2c01

View File

@ -13,7 +13,7 @@ import (
// MouseAction is a mouse action. // MouseAction is a mouse action.
func MouseAction(typ input.MouseType, x, y int64, opts ...MouseOption) 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 // apply opts
for _, o := range 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 { return ActionFunc(func(ctxt context.Context, h cdp.Handler) error {
me := &input.DispatchMouseEventParams{ me := &input.DispatchMouseEventParams{
Type: input.MousePressed, Type: input.MousePressed,
X: x, X: float64(x),
Y: y, Y: float64(y),
Button: input.ButtonLeft, Button: input.ButtonLeft,
ClickCount: 1, ClickCount: 1,
} }