IFrame src file is not correct

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 src file is not correct

Post by Aracknid » Thu Aug 18, 2011 10:57 pm

I've got an iFrame, and I'm trying to find out the source page it is displaying. I know it is something other than blank, because I can see stuff in it and if I get the properties of the frame (by CTRL + right click and then selecting Properties, I can see the URL).

When I use Ranorex Spy and I click on something in the IFrame, I get the right info back for what I clicked on, but if I go up to the parent I frame, it shows the Src as "/blank.htm" and the SrcDoc is nothing.
iframe.JPG
iframe.JPG (119.2 KiB) Viewed 2261 times
If I go down to the Body in the iFrame there is no info in there. If I go down to the Form in the body, the Action property for this has the name of the page "e.g. xyz.aspx" but no the full URL.

Any ideas?

Aracknid

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

Re: IFrame src file is not correct

Post by Support Team » Fri Aug 19, 2011 10:30 am

Hi,

I have tested it with a simple html site:
<html>
<body>
<iframe srcdoc="<p>Hello world!</p>" src="/default.asp"></iframe>
</body>
</html>
and everything was identified as expected. So maybe there is no SrcDoc attribute set and maybe the name of the site is really "/blank.htm"?
Which version of Ranorex are you using, if you are not using 3.0.5 please make an update?
You can take a look at your html source files to determine if the SrcDoc attribute is set and if the Src attribute was identified correctly?
If you are working with the 3.0.5 and the the attributes wasn't identified correctly it would be very helpful if you can send us a sample file?

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 src file is not correct

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

The developer told me that they initially set the src to blank.htm and then dynamically load a page. He said it looks like you are not aware that a newer page was loaded.

I'll try upgrading to 3.0.5 to see if it makes a difference.