views:

148

answers:

2

Hi,

I am using Firefox and i have a page which has an <iframe> Tag. 

The contents embedded within this tag cannot be seen from normal "View Page source" option. So i installed Firebug plugin and i can get see the contents using Firebug. My issue is, i cannot script any of these elements using FireWatir. Anybody has any ideas how to do this using Firewatir? Your help would be greatly appreciated.

+1  A: 

You can only script the iframe's page if it comes from the same domain. If so, you can access the iframe's document by doing iframe.contentDocument. You can also access the iframe's window by doing iframe.contentWindow:

https://developer.mozilla.org/en/HTML/Element/iframe

allyourcode
A: 

Watir and FireWatir should not have problems with frames. Take a look at Frames page at Watir wiki for more information.

You did not say what is the problem. Some relevant HTML and your Watir code would help.

I would also suggest that you post this at Watir list too.

Željko Filipin