Xetera / ghost-cursor

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

[Question] Are "MouseEvents" the same as a real, physical mouse movement? #56

Closed 0x7357 closed 2 years ago

0x7357 commented 2 years ago

I have problems with the offsets etc. (address bar, tabs bar, etc.) and therefore wonder if MouseEvents are the same as real, physical mouse movements or if programmatic mouse movements are recognizable as "programmatic"?

Niek commented 2 years ago

They should not be recognisable as non-human mouse events, that's basically the whole purpose of this project :)

0x7357 commented 2 years ago

@Niek I don't mean the movement itself. That ghost-cursor generates the movements, I know that. I am talking about the technical aspect. When I use MouseEvents to cause a movement from {x: 100} to {x: 200} or when I physically move the mouse from {x: 100} to {x: 200}. Can this be "distinguished" by a web page?

Niek commented 2 years ago

@DannyEndert there should be no difference between the mouse events generated by the CDP protocol (Input.dispatchMouseEvent()) and human mouse events. For example, they both have isTrusted: true, while a manually created event shows this property as false.