Xetera / ghost-cursor

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

Start position is always 0,0 #38

Closed excelant100 closed 3 years ago

excelant100 commented 3 years ago

The Start position of cursor.move or click is always 0,0. I want to randomize this, where can I set that?

I tried to page.mouse.move to a random coordinates, but since I am scrolling. The movement done by page.mouse is useless and the cursor spawns back to 0,0.

Niek commented 3 years ago

You can use this function for that: https://github.com/Xetera/ghost-cursor/blob/2a7ac70027c0beaece6929904ca1264e0cff4a06/src/spoof.ts#L46-L50