headless-recorder icon indicating copy to clipboard operation
headless-recorder copied to clipboard

Allow the recording of hover or mouse activities

Open adamchenwei opened this issue 5 years ago • 17 comments

seems the mouse movement are not recorded. so therefore, the hover triggered dom won't be able to get triggered... is there way to enable that recording, or its something can not be done with puppeteer as a hard limit?

really like the tool able to pick up the dom correctly, way better than my guessing game. ha. keep it up!

adamchenwei avatar Jun 12 '19 17:06 adamchenwei

Hi @adamchenwei this is not a bug. It is just not implemented as a feature. Please remove the [bug] from the title and rewrite your question as a feature request.

Even better, add the feature as a pull request and check our contribution guidelines

tnolet avatar Jun 12 '19 17:06 tnolet

@tnolet by not implemented as a feature , would you mean puppeteer is able to track mouse and hover actions just need to be added to this plugin? thanks!

adamchenwei avatar Jun 12 '19 17:06 adamchenwei

@adamchenwei I'm not sure. We can do things with coordinates and mouse actions, that is sure. The exact details will have to be prototyped and researched.

tnolet avatar Jun 12 '19 17:06 tnolet

definitely looking forward to this feature, tracking mouse movements and actions would be a wonderful idea.

choleaoum avatar Jul 15 '19 03:07 choleaoum

@tnolet @choleaoum a few days ago I was tinkering with the extension just because I needed to track the mouse movements to get the coordinates of the cursor and it is possible (ss). My only concern is that people don't need this feature always. We can add a button to toggle the mousemove behavior but I'm not sure if all of this goes with the contribution guidelines: Features should serve the general public. Very specific things for your use case are frowned upon.

Screenshot 2019-07-15 at 4 53 31 PM

saranshbarua avatar Jul 15 '19 11:07 saranshbarua

Do people need to track movement or just the state after the mouse is in the desired location (e.g. to generate at wait selector)? Would a hotkey to insert a wait or exist for the currently hovered item work?

ephetic avatar Jul 15 '19 18:07 ephetic

My personal use case was to track the movement of the mouse while drawing on canvas, so I wanted the exact mouse coordinates to replicate the drawing mechanism. But there can be other uses as well. For eg, while using a slider (like the one in shopping sites to add filters)

saranshbarua avatar Jul 17 '19 18:07 saranshbarua

@tnolet do you want me to submit a PR for this? What are your thoughts?

saranshbarua avatar Jul 19 '19 16:07 saranshbarua

@saranshbarua How many mouse events does this typically log for you? Puppeteer supports mouse movement interpolation, so it'd be cool if there were a way to merge approximately collinear movements (but then you'd also need a threshold control in the recorder settings and then maybe you'd want a way to fake timing also, and on and on).

ephetic avatar Jul 19 '19 16:07 ephetic

@saranshbarua that would be great!

Two concerns:

  1. I guess a challenge would be the toggling on / off of this feature. From a user perspective, it would be best to not always record mouse moves as it will flood the recording. So we should either introduce a keyboard switch or some other user toggle. A user should be able to toggle this during a recording.

  2. The mouse movements probably need to be "diluted" or debounced as it can otherwise generate way too much data.

Please take into account the following:

  • There should be a test / some test to cover this new behaviour
  • please take care to look at the code conventions.

tnolet avatar Jul 19 '19 16:07 tnolet

it seems Recorder can't record the scroll event...

Pain-and-Love avatar Aug 26 '19 04:08 Pain-and-Love

@Pain-and-Love It's actually only built to record a modest set of events: https://github.com/checkly/puppeteer-recorder/blob/master/src/code-generator/dom-events-to-record.js

ephetic avatar Aug 26 '19 17:08 ephetic

@adamchenwei we are picking up development again, please have a look at https://github.com/checkly/puppeteer-recorder/issues/83

tnolet avatar Mar 10 '20 11:03 tnolet

Any updates on this? I'm dealing with the same scenario (recording canvas events), and this would greatly speed up my workflow!

segments-tobias avatar Jan 21 '22 09:01 segments-tobias

Interested!

smith558 avatar Jul 05 '22 17:07 smith558

@tnolet @choleaoum a few days ago I was tinkering with the extension just because I needed to track the mouse movements to get the coordinates of the cursor and it is possible (ss). My only concern is that people don't need this feature always. We can add a button to toggle the mousemove behavior but I'm not sure if all of this goes with the contribution guidelines: Features should serve the general public. Very specific things for your use case are frowned upon.

Screenshot 2019-07-15 at 4 53 31 PM

Any chance you've made a fork available? I'd be quite interested in this. :)

smith558 avatar Jul 05 '22 17:07 smith558

Hey @smith558, sadly we don't have any updates on this yet but contributions are welcome :)

ianaya89 avatar Jul 05 '22 17:07 ianaya89

https://github.com/checkly/headless-recorder/issues/232

ianaya89 avatar Dec 16 '22 13:12 ianaya89