IFrame or Frame don't have a ready state?

Class library usage, coding and language questions.
User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

IFrame or Frame don't have a ready state?

Post by Aracknid » Wed Aug 17, 2011 9:04 pm

If I have a WebDocument object, I can check its ReadyState property to see if it is complete, interactive, loading, etc...

Frames and IFrames can also have a state, at least in IE based on some old code I'm trying to port. I cannot see how to check a Frame or iFrame's state with Ranorex. Is this possible? See http://msdn.microsoft.com/en-us/library ... s.85).aspx

So what happens is when I click something in my App, the IFrame starts to load, and I need to check something in the IFrame once it has completed loading. Because I'm trying to write a generic function, which will be called from many different places, and the IFrame will not always display the same things (it will never be a consistent UI) I cannot look for something that will always be there (a common solution for AJAX).

Aracknid

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

Re: IFrame or Frame don't have a ready state?

Post by Support Team » Thu Aug 18, 2011 12:39 pm

Hi,

Would it be possible to post us a small sample project with source code? Currently I can find not HTML attribute which supports this. Are you using HTML 5?

Thanks in advance.

Regards,
Peter
Ranorex Team
.
Image

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: IFrame or Frame don't have a ready state?

Post by Aracknid » Thu Aug 18, 2011 3:04 pm

I should have said I'm checking the WebDocument's "State", which I assume is the same thing as the ReadyState as provided in the URL.

Sorry, I cannot provide a small sample app. The app I'm testing is HTML 5 (basically).

Maybe what I should have asked is, you have a State property for WebDocument objects. Why not for other objects, like Frame and IFrame?

Is there another way to achieve what I am trying to do?

Thanks,

Aracknid

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

Re: IFrame or Frame don't have a ready state?

Post by Support Team » Fri Aug 19, 2011 12:31 pm

Hi,

Unfortunately HTML 5 is not yet supported by Ranorex but other than that the IFrame or Frame has no such properties yet, because it is not a DOM object and at the moment only the DOM object offers such a property.
I added this as feature request and we will see what we can do to offer such a functionality.
At the moment you have to find a way how you can check if the IFrame/Frame was loaded.

One solution could be that you try to search for more than one element in your IFrame/Frame and if one of them was found you know that the Frame was loaded correctly.

Regards,
Markus
Ranorex Support Team
.
Image

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: IFrame or Frame don't have a ready state?

Post by Aracknid » Fri Aug 19, 2011 2:13 pm

One solution could be that you try to search for more than one element in your IFrame/Frame and if one of them was found you know that the Frame was loaded correctly.
Is there a way to look for many different items all at the same time, and if any one of them is present to stop looking? Typically, what I have been doing is looking for object A for a second. If not there, looking for Object B for a second, etc.. Eventually after looking for a group of objects, I'll try again (in a loop) fo a total amount of time.

Aracknid

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: IFrame or Frame don't have a ready state?

Post by Aracknid » Fri Aug 19, 2011 2:28 pm

Support Team wrote: Unfortunately HTML 5 is not yet supported by Ranorex
When will HTML 5 support be added?

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

Re: IFrame or Frame don't have a ready state?

Post by Support Team » Mon Aug 22, 2011 11:28 am

Hi,

This was just a mix up. HTML 5 is already supported, but not all tags and attributes.

Regards,
Peter
Ranorex Team
.
Image