Good Afternoon!

Moving to Firefox 4 and webdriver and noticed a difference I can't
seem to get past from FF3.6 and Watir - I can't seem to acces the HTML
from an iFrame.

# On two different Windows XP images, Ruby version 1.9.2
# Test to get version number of windows Safari

testpage = "http://www.apple.com/safari/download/";

# In FF3.6 and Watir 1.8.1
require 'rubygems'
require 'watir'

ff = FireWatir::Firefox.new
ff.goto testpage
ff.frame(:name, 'myframe').html.include? "5.0.5' => true!  Just what I
wanted to see.
-----
# FF4 Webdriver 0.2.3
require 'rubygems'
require 'watir-webdriver'

ff = Watir::Browser.new(:firefox)
ff.goto testpage
ff.iframe(:name => 'myframe').html.include? "5.0.5" => false!

I know we should be finding the version number, so something is up.
If I just ask for the HTML, I get the iFrame tag - Not the html that
it returns.
Only the iFrame is Returned:
<iframe src="https://swdlp.apple.com/cgi-bin/WebObjects/
SoftwareDownloadApp.woa/wa/getProductData?
localang=en_us&#38;grp_code=safari&#38;returnURL=http://www.apple.com/
safari/download&#38;isMiniiFrameReq=N" title="Please select a
download." name="myframe" frameborder="0" allowtransparency="true"
scrolling="no" id="download-frame" style="height: 660px">Your browser
is not compatible with this content; please upgrade to a standards-
based browser.</iframe>


When I used FF3.6 and Watir, I got the HTML inside the iFrame,  (most
html omitted for brevity)
Returned:
<iframe>
<html><head><body><div id= ...   {Version number a few levels
down} ... </div></body></head></html>
</iframe>

Am I missing something here?  The iFrame is on the same domain,
apple.com, and looking at the webdriver api for [Class:
Watir::IFrame], I can't seem to find anything that might work.  Help
would be greatly appreciated, thank you!

Quick note, I used "ff.iframe" instead of "ff.frame" in the webdriver
version because ff.frame returned an error,
[Selenium::WebDriver::Error::UnexpectedJavascriptError: Could not
convert Javascript argument arg 0].  ff.iFrame seemed to work so I
began to use that.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to