Trouble doing the Flex AIR Instrumentation

Class library usage, coding and language questions.
Mourasman
Posts: 29
Joined: Fri Oct 21, 2011 6:09 pm

Trouble doing the Flex AIR Instrumentation

Post by Mourasman » Tue Dec 27, 2011 12:09 pm

Hey guys,

I'm trying to automate an AIR application but I'm having trouble doing the instrumentation. I'm following all the steps in here but it still doesn't work after all that. I've also tried adding the ranorex .swc to the "libs" folder in the project to no good...

Has anyone ever had this problem?

Regards,
Mourasman

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Trouble doing the Flex AIR Instrumentation

Post by Support Team » Tue Dec 27, 2011 3:13 pm

Hi,

Normally there shouldn't be a problem to instrument your air application with the lib method. Which version you air do you use? Did you try to use the Ranorex Module instrumentation method instead of the lib method? Do you get a limitation popup if you try to track any element in your air application?

Regards,
Peter
Ranorex Team
.
Image

Mourasman
Posts: 29
Joined: Fri Oct 21, 2011 6:09 pm

Re: Trouble doing the Flex AIR Instrumentation

Post by Mourasman » Tue Dec 27, 2011 6:58 pm

Currently, I'm using AIR 3.1 (Flex 4.6.0) and I'm trying to instrument the app using the Module method but where do I add these lines?

var rxloader : Loader = new Loader();
FlexGlobals.topLevelApplication.parent.addChild(rxloader);
rxloader.name = "__rxloader";
rxloader.width = 0; rxloader.height = 0;
rxloader.load(new URLRequest("RanorexAutomation.swf"));

Where's my initialization code when all I have is an .mxml file? (I'm new to Flex, so this may be a stupid question, but I've already google'd it without success...)

And yes, I'm getting the typical warning pop-up regarding bad instrumentation.


Thanks,
Mourasman

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Trouble doing the Flex AIR Instrumentation

Post by Support Team » Tue Dec 27, 2011 8:13 pm

Hi,

Did you do the steps of Adobe Flex: Load the Ranorex Lib into your Flex application?

The correct steps for your Flex/Air would be How to load the Ranorex Module into your Flex/AIR application.

Regards,
Martin
Ranorex Support Team
.
Image

Mourasman
Posts: 29
Joined: Fri Oct 21, 2011 6:09 pm

Re: Trouble doing the Flex AIR Instrumentation

Post by Mourasman » Tue Dec 27, 2011 8:25 pm

Regarding the first method, on step 7, what is the output directory, that I should add to the trusted locations, when you're exporting your AIR application to an installer (.exe)? I assume it's the installation path, right? At least, that's what I've been doing... As for the other steps, I'm doing all of them, including step 4.

As for the second method, where do I paste all that code? All I have is an .mxml file and if I try to put that code inside the <fx:script> tag, it returns "Access of undefined property FlexGlobals". Do I need to import anything else?

Regards,
Mourasman

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Trouble doing the Flex AIR Instrumentation

Post by Support Team » Tue Dec 27, 2011 11:39 pm

Hi,

What I know, Flex 4.6 is a pre-release version of Flex and we didn't test this till today. We will investigate some time to check if the instrumentation works with the current method or not. Maybe we need to do some changes in code to support Flex 4.6. In Ranorex 3.2.1 this support will be available then.

Are you sure you use Air 3.1 or do you use 3.2?

Regards,
Peter
Ranorex Team
.
Image

Mourasman
Posts: 29
Joined: Fri Oct 21, 2011 6:09 pm

Re: Trouble doing the Flex AIR Instrumentation

Post by Mourasman » Wed Dec 28, 2011 2:56 pm

Absolutely, I'm using 3.1.0.4880.

Thanks for looking into this,
Mourasman

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Trouble doing the Flex AIR Instrumentation

Post by Support Team » Tue Jan 03, 2012 3:07 pm

Hi,

The best way to solve your problems/issues and answer your questions might be a remote session.

We will contact you to find a date within calendar week 2 for the remote session.

Best Regards,
Martin
Ranorex Support Team
.
Image