Xetera / ghost-cursor

🖱️ Generate human-like mouse movements with puppeteer or on any 2D plane
MIT License
1.03k stars 120 forks source link

Is there delay between last curve point and click action? #112

Closed AndriusCTR closed 7 months ago

AndriusCTR commented 10 months ago

Great plugin, but since the docs are very minimal, I wonder if there is a setting (or better yet, random time delay implementation) so that when cursor moves over a button, it waits 'a bit' (like human) before clicking it.

TheGP commented 7 months ago

Seems like there is no. Btw that delay is called hesitation. And there is a delay before mouse up.

      if (selector !== undefined) {
        await actions.move(selector, options)
        actions.toggleRandomMove(false)
      }

      try {
        await page.mouse.down()

I have added "hesitate: 1000," in options for click in my fork: https://github.com/TheGP/ghost-cursor (UPD it is already pulled by ghost cursor itself, use the official lib)

Niek commented 7 months ago

Fixed in #116

AndriusCTR commented 6 months ago

Fixed in #116

Is this a random delay? If it's fixed then it's the same as no delay... definitely need to have random number, e.g. 500-900ms, etc.

TheGP commented 6 months ago

@AndriusCTR Generate the random number and pass it. This is a cursor library, not a random numbers generator library.

AndriusCTR commented 6 months ago

@AndriusCTR Generate the random number and pass it. This is a cursor library, not a random numbers generator library.

Thanks, somehow missed that it's an options setting. Is this official release?