Skip to content

Commit

Permalink
change int64 to float64 for chromedp.MouseClickXY
Browse files Browse the repository at this point in the history
  • Loading branch information
tenox7 committed Dec 25, 2019
1 parent fafe232 commit e2c06b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wrp.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (w wrpReq) capture(c string, out http.ResponseWriter) {
var err error
if w.X > 0 && w.Y > 0 {
log.Printf("%s Mouse Click %d,%d\n", c, w.X, w.Y)
err = chromedp.Run(ctx, chromedp.MouseClickXY(int64(float64(w.X)/float64(w.S)), int64(float64(w.Y)/float64(w.S))))
err = chromedp.Run(ctx, chromedp.MouseClickXY(float64(w.X)/float64(w.S), float64(w.Y)/float64(w.S)))
} else if len(w.F) > 0 {
log.Printf("%s Button %v\n", c, w.F)
switch w.F {
Expand Down

0 comments on commit e2c06b2

Please sign in to comment.