JavaScript Macro Recorder

Here is a screen recording of my JavaScript Macro Recorder in action.

Here is a test URL for a page that has the JavaScript code embedded. Works under IE and Firefox. Safari “Real Soon Now” 🙂

Add these two lines of code into your pages <HEAD> element and your page will be recordable.

<script src=""></script>
<script src=""></script>

Post a comment and tell me how long it takes to load please 🙂

I started writing this last year, finished it a few months ago and have spent the last few months tweaking and testing.

It is entirely written in JavaScript and does not need a proxy server of any kind.

You simply need to add a few lines of JavaScript to your page and a small text control panel is added to the page.


  • [record] will start recording.
  • [stop] will stop recording or playback
  • [play] will playback the current macro.
  • [fast] will play the macro back at faster than recorded speed
  • [loop] will loop the macro
  • [hide] will hide the control panel during playback

The control panel and the macro recorder itself is based around a simple plugin architecture. I have plugins close to completion that will load and save macros and record a suite of testcases of multiple macros across a whole site. 

I’ve also started on plugins that will transcode a recorded macro into Watir and Selenium formats.

Does not work under Safari, but there is no reason why it can’t. Any Safari guns willing to help? More on that in the screen recording tonight.



About James McParlane

CTO Massive Interactive. Ex Computer Whiz Kid - Now Grumpy Old Guru.
This entry was posted in JavaScript, Web2.0. Bookmark the permalink.

12 Responses to JavaScript Macro Recorder

  1. Mike King says:

    These adds had some good info. Mouse and keyboard recorders. Pretty handy.


  2. Dave Seleno says:

    This is great work, I hope to integrate this into the AJAX webapp we are building and will give feedback along the way.

    BTW, It took about 4-5 seconds to load up. The image for the cursor during playback was broken.

  3. Thanks!

    Did it load any faster on subsequent loads?

    I’ve fixed the broken image cursor.

    It now loads the images from or from a directory called images relative to the file if you are testing with if you run it on your local file system.

    I need a way to specify a path for image resources.

  4. I killed the apache server for by accident, so it was probably broken over the weekend.

    Thank goodness for unit tests 🙂

  5. Mandar says:

    Have you tried the macro recoder on pages with frames? I gave me error when I tried it. (Document not found).

  6. I tried it with IFRAMES and it works fine.

    If you can send me a testcase that I can replicate the error with, I will see if I can work out what the issue is.

  7. Felix says:

    Is the macrorecorder capable of recording link clicks respectivly page changes?

    Great Work!

  8. Yes – I wrote a plugin that using a cookie will link page session to page session. Will clean it up and publish it one day..

  9. Felix says:

    Thanks, looking forward seeing the plug-in. Maybe i can help cleaning it up? (see email)

  10. guy says:

    Impressive work !
    Did you release other versions ? what about plug-ins that you are mentionning ?
    I would be very interested in Watir , eventually Selenium extensions

  11. Elias says:

    Hi! I don’t know if im doing it wrong or if your script is broken, but i can’t get your example site to show the GUI in any browser..

  12. metawrap says:

    For some reason I didn’t get any of these later comments sent to me 😦

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s