cboulanger / eventrecorder

A qooxdoo package that allows to record user interaction for replay in testing or presentations
https://cboulanger.github.io/eventrecorder/eventrecorder/
1 stars 5 forks source link

Recording of right clicks - contextmenu #6

Open jaminfine opened 5 years ago

jaminfine commented 5 years ago

Eventrecorder does not record the "contextmenu" event, which is triggered by right clicking on a qooxdoo widget. So, when the test is played back, the right clicking does not happen, the context menu is never opened, and the test fails on the next step.

cboulanger commented 5 years ago

This would be easy to implement:

  1. Add a case "contextmenu" in cboulanger.eventrecorder.Recorder#createIntermediateCodeFromEvent() which outputs the command contexmenu with the ID of the target and a serialized version of the event data (you can only pass scalar values and object ids)
  2. Add the method cmd_contextmenu in cboulanger.eventrecorder.IPlayer and cboulanger.eventrecorder.player.Qooxdoo, taking the ID and the event data and dispatching a correct "contextmenu" event on the object with that ID.

Maybe you or @derrell might want to try? It shouldn't be very difficult.

jaminfine commented 5 years ago

Okay, I will give it a try. Thank you for the information about where to add it