Ranorex has developed a new, more comfortable way of Flash/Flex instrumentation. This alternative way makes it possible to automate Flash/Flex based applications without modifying the application itself.
To automate your application this way, you have to install the Adobe Debug Flash Player and use the new Ranorex Preloader for all Flash/Flex applications.

Please see the Adobe Flash/Flex instrumentation wizard documentation page
Setting up the Ranorex Preloader:
- Install the Adobe Debug Flash Player on the machine on which you would like to record and execute Ranorex test scripts and for all browsers you would like to test with. The installers are available on Adobe’s download page; the following are the links to the Debug Player 10 for Internet Explorer and Firefox.
- Download the Ranorex preloader package“RxPreloader.zip” (containing RanorexAutomation.swf and RanorexAutomation.swc”), save it to your local drive and extract it (in the following referred to as preloader location); in this example I will use “C:\FlashFlex\RanorexAutomation.swf” for the preloader location. Remember the location you placed the RanorexAutomation.swf file to, you will need it in the next steps!
- Open your user profile directory %UserProfile%, e.g. by opening Windows Explorer and copying the string %UserProfile% into the address bar.
- Create a new file called „mm.cfg” in your user profile directory and insert the following line of code, where “C:\FlashFlex\RanorexAutomation.swf” needs to be replaced by the preloader location from step 2:
PreloadSwf= C:\FlashFlex\RanorexAutomation.swf
Additional to this configuration entry you can enable the logging mechanisms of the Adobe Debug Flash Player, which might be helpful if you have any problems with this kind of instrumentation. In such a case you can then simply provide this logging information to our support team. To enable logging you have to add the following line of code to your “mm.cfg” file:
TraceOutputFileEnable=1
This additional configuration entry forces the Debug Player to create a log file at following location:
C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs - Open the following link and add the preloader location folder (from step 2), which contains the RanorexAutomation.swf file, to the trusted locations, for my example that is “C:\FlashFlex”:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html#119065
After performing these steps you should be able to automate any Flash/Flex based application without any modification to the application. To verify that everything went right, you can use Ranorex Spy and track some controls within a Flash/Flex application (e.g. this Flash example).
The new Ranorex Preloader can also be used as “Automation Lib” or as “Module” the same way as described in our Flash/Flex Technology instrumentation chapter within the Ranorex User Guide (use the .swf or .swc file stored in “RxPreloader.zip” instead of the files located in the Bin directory of your Ranorex installation):
Please note when using the Adobe Debug Flash Player you might get some error messages that are not shown by the normal Flash Player. These error messages are based on the fact that the Debug Player is more verbose regarding error handling than the normal Flash Player. The shown error messages are caused by the Flash application and are usually not referable to the Ranorex instrumentation.
Tags: Accessibility, Chrome, Cross-Browser, Firefox, Flash/Flex, Internet Explorer, Safari, Technology, Web

Subscribe
May 30th, 2011 at 4:49 pm
Hi there,
just a quick one. What are the benefits over using the regular flex loader functionality?
Best,
Christian
May 31st, 2011 at 10:49 am
Hi Christian,
if you have allready instrumentated your application under test with Ranorex, there are no benefits in using the new way of instrumentation.
Basically this new way makes it easier to instrumenat you flash/flex application, because you do not have to modify your application or manually start your applicatiion via a preloader. It instantly allows you to instrument any flash/flex based application.
Regards,
Tobias
June 2nd, 2011 at 12:32 pm
Hello,
Is it possible to automate flex custom components without making any changes in the application?
Thanks,
Nidhi
June 9th, 2011 at 7:33 pm
Hi Nidhi,
Yes, with the preloader method described above it is indeed possible to automate flex components (also custom ones) without making changes to the application.
Regards,
Alex
July 20th, 2011 at 7:32 pm
Question: If we recorded many scripts already with our application that included the instrumentation. Then if we remove it from our application and use the preloader. Will our old scripts still work? We tried one and I don’t works. I noticed in the Xpath @automationname (from our old script) which I don’t see with the spy when we use the preloader
August 11th, 2011 at 2:52 pm
Occasionally I cannot access Flash/Flex objects via Ranorex Spy with the preloader method. I have to restart the browser and the Flex app. Has anyone else run into this issue? Is there a fix for it?
August 29th, 2011 at 3:19 pm
Hi All,
I’m new to Ranorex. But I found something interesting with it so I decided to explore the tool.
Can any one explain how to get the URL name dynamically of all currently running browsers using C# code in Ranorex.
August 29th, 2011 at 8:00 pm
This pluging works too with 2.3.0 Ranorex Version?
September 7th, 2011 at 6:31 pm
Does the use of Ranorex with Flex ‘see’ multiple flex modules on the web page? (A flex module is one *.swf file.) Or, is it limited to one open module at a time?