Recording Flash automation with FlexMonkium

Gorilla Logic created FlexMonkey — a test automation tool for Flex. Now they’ve added FlexMonkium which allows you to use FlexMonkey with Selenium to seamleslys automate the web browser and Flash with a single API.  There’s also a plugin for Selenium IDE that allows you to record.

To install FlexMonkium, you have to go to the GorillLogic website and register as a user, and give them your email address and assorted other personal info.  I had several errors and timesouts going through this process, but eventually got registered.  The I could download the FlexMonium zip file.  I unzipped this and dragged the XPI onto my Firefox browser window (with Selenium IDE 1.0.10 already installed) to install the plugin.  It would be much easier to just have the plugin available directly on their site.  The, after restarting Firefox, I could launch Selenium and under Options->FlexMonkium, I had to specify the full path to the FlexMonkium console.  This is not included in the zipfile.  It’s a separate download that requires you to have Adobe AIR installed (It’s an AIR app, but also, the only way to download it is over Flash with AIR already installed and in the PATH — Tweetdeck also makes this error.)

You then have to set up FlexMonkium with a Flex project, and then copy the automation_monkey-X.X.swc to your project lib folder and rename it automation_monkey.swc (X.X corresponds to your Flex SDK version)

Convoluted, but it works!

14 thoughts on “Recording Flash automation with FlexMonkium

  1. Hi everybody! Please could any one give me the simple answer – is that possible to record the website with the Flex from the Internet – I mean that I don’t have the code of this website on my PC, with the same way as it would be the simple website just with CSS and JavaScript, as we use to record such websites with standard Selenium-IDE.

    I have installed FlexMonkiumConsole, flexmonkium.xpi for FireFox 3.6 and have added user-extension.js to Selenium-IDE,
    but while I’m trying to record Flex website – Selenium-IDE can’t record Flex elements. What should I to do? Do I need the code of the Flex website which I’m going to record?
    Thanks for any little help.

    1. Yes, Flexmonkium allows you to record actions on a SWF (flash application) the same way Selenium records actions within the HTML.
      It sounds like you’ve gone through the right steps to install FlexMonkium, so I’m not sure why it isn’t working for you. Maybe we can figure out what you need with more information.

  2. I take back everything I said. It does in fact seem that the automation_monkey.swc needs to be included in the flex app, and that it will only work with those apps.

    I previously thought you just needed it to be available for the project with the test scripts. I’ll research some more and post a now blog entry.

  3. Okay, if it doesn’t work that way,there is one more way that I’m going to continue, please take a look here
    every thing is pretty clear, but the question is – which way can I get the ID of element, to write down it – like in this string the second argument flashApp = new FlashSelenium(selenium, “clickcolors”);
    Is any instrument to inspect like FireBug?

    1. Vitaly-

      You’re in an area I don’t know much about. You could find a swf decompiler, but that won’t be much fun. I’ve got flash automation on my list of things to re-investigate, and I’d love to hear about what you learn.


      1. I just was wondering which way is to make automated tests for Flesh web page by using Selenium-IDE or Selenium RC.
        Actually it seems not be so easy in case if there is no available code on your PC for web page you going to test.

  4. Hi, Can we automate the game applications using Flexmonkium which were developed in Flex. Can we record each every action using this tool? If so, Do we need to add any additional plug-ins or files. I am able to record and playback the sample application which was developed in Flex using IDE. But interested to know about Flex game automation. Appreciate your earliest response.

  5. hey aaron in your original post you said FlexMonkium prompted you to specify the full path to the FlexMonkium console. You stated that this full path did not come with the zip file and actually is available as a seperate download elsewhere. Could you perhaps tell me where I could find this additional download or provide the link here.. Thanks for your time, I am also new to this I am an intern working on GUI and test automation

  6. Hi, If you want to test any flex application you need to compile your application with the respective flex library –
    In order to use FlexMonkium – you need to compile the flex application with automation_monkey4.x.swc (4.x is the version of FLex SDk).
    In order to use Selenium – you need to compile the flex application with sfapi.swc.

    Once after compiling then you can see that the flexmonkium(which is plug in to firefox & selenium IDE) is connected to the application and then you can start recording using Selenium IDE.

  7. Hi I am using flexmonkium to automate Flash user interface.There are buttons whose labels are replaced with image.It is not recognizing those buttons..I am sharing a part of code.The value is same in the source code and the recorded code.Here the value “siteR” refers to button whose label is replaced with an image..
    for (int t = 0;; t++) {
    if (t >= 60) fail(“timeout”);
    try {
    if (proc.getBoolean(“isFlexMonkey”, new String[] {“”})) break;
    } catch (Exception e) { }

    Please help me its urgent..

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