Flash Page cannot be identified sometimes for same script

Bug reports.
Sleep1990
Posts: 2
Joined: Thu May 26, 2016 6:40 am

Flash Page cannot be identified sometimes for same script

Post by Sleep1990 » Thu May 26, 2016 8:01 am

Hi,

I am running flash automation with Ranorex 5.4 in Internet Explorer 11 with the instrumentation preloader on Windows 7 x64. And we have to use preloader to instrument flash for some limits.

Previously we added a refresh(F5) action when entering a new flash page, to make sure that the flash object can be recognized correctly(NO popup "Ranorex Technology Limitation"), and it worked. But currently we find it doesn't work every time for the same script.

Here are the content of the tow Flash Trace Log – Files

When flash object can be identified:

Code: Select all

Ranorex: preloader stage0
Ranorex: preloader stage1
Ranorex: 5.4.0 Flash: WIN 18,0,0,352 ActiveX debug
Ranorex: there seems to be no Flex or we are being preloaded
Ranorex preloader: stage2
Ranorex: load from url: http://localhost/XXXXX/XXXXX.swf
Ranorex: preloader stage3
Ranorex: non-flex init from: http://localhost/XXXXX/XXXXX.swf content:[object _marketrates_mx_managers_SystemManager]
Ranorex: Init with root: [object Stage] prev:null
Ranorex: playerType: ActiveX
Ranorex: check if setup external interface needed
Ranorex: external interface setup complete.

When object can not be identified and Limitation pops up:

Code: Select all

Ranorex: preloader stage0
Ranorex: preloader stage1
Ranorex: 5.4.0 Flash: WIN 18,0,0,352 ActiveX debug
Ranorex: there seems to be no Flex or we are being preloaded
Ranorex preloader: stage2
Ranorex: load from url: http://localhost/XXXXX/XXXXX.swf/[[DYNAMIC]]/1

So I guess the problem is focus on the received URL, when "/[[DYNAMIC]]/1" is appended, the preloader is blocked on stage2. I don't know how the system under test generate that each time and how Ranorex receive and analyze the URL correspondingly... Maybe something missed with the URL process function for preloader?

This is my first time post issue in ranorex forum, probably the information is not enough to figure it out, because I am not sure what more information can be provided due to security policy. But let's see if anyone can provide some advice or already know the answer?

Thanks in advance.


Regards,
Joe

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

Re: Flash Page cannot be identified sometimes for same script

Post by Support Team » Mon May 30, 2016 3:00 pm

Hello Joe,

Thank you for the detailed error description and for providing the flash log files.

The attached log file indicates that the issue is related to the Adobe Flash Pre-Loader. Unfortunately, there is currently no permanent fix for the issue due to technical limitations. The DYNAMIC part of the URL cannot be resolved by Ranorex and prevents correct object recognition of Flash/Flex elements.

At the moment, there are two workarounds to resolve the issue. The first workaround would be reloading the page before tracking an element, but unfortunately this workaround is inconsistent.

The other, and more reliable workaround, would be loading the Ranorex Lib into the Flash/Flex application instead of using the Ranorex PreLoader.

I hope this information will help you.

Sincerely,
Johannes
.
Image

Sleep1990
Posts: 2
Joined: Thu May 26, 2016 6:40 am

Re: Flash Page cannot be identified sometimes for same script

Post by Sleep1990 » Tue May 31, 2016 7:39 am

Thank you Johannes,

Appreciate for your feedback and advise. So that's an existing issue for preloader and no fix due to technical limitations. And it depends on FLEX for whether the DYNAMIC part is included, am I right?

Still prefer to use preloader to run flash automation, is there a way to track the status of preloader in code? In other words, to know the flash identification works immediately, not by the Exists function, then I can make several reloading according to the result in code for each new flash page.

Regards,
Joe

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

Re: Flash Page cannot be identified sometimes for same script

Post by Support Team » Wed Jun 01, 2016 7:37 am

Hi Joe,

Yes, you are right, it depends on the flex application whether the DYNAMIC part is included.

Unfortunately, there is no way to check the status of the preloader by code. What could be done is to check if a specific flash/flex objects exists, which implies that the application was instrumented correctly. In order to use this workaround, you will need to find a specific UI element that exists in any case.

Code: Select all

bool loadedSuccessfully = repo.DomElement.FlashObjectInfo.Exists();
Detailed information about the Exists() method can be found in our API documentation.

If you need more information, please don't hesitate to ask.

Sincerely,
Johannes
.
Image