When I read out the HTML returned by Watir, it gives me a page directing me to come back on a browser through my Mac or PC. It seems I am being redirected by a user agent given through Watir. I thought I was driving the browser with Watir, but this doesn't seem to be the case.
ie = Watir::IE.new
ie.goto "http://www.apple.com/safari/download"
ie.checkbox(:name, "21.1.9.12.3.1.3.0").clear
Which returns an UnkownObjectException. Same with trying to click the submit button.
Using firebug I can find the checkbox fine, that's how I found the :name. So I next redirected the HTML output from Watir into a file for inspection,
myfile = File.new("safaridebug.html", "w+")
myfile.puts ie.html
myfile.close
Looking through safaridebug.html is where I noticed I was on a different page from the web browser. Is there someway in watir I can get the actual HTML that is present in my web browser, maybe a user agent spoof? Thanks.
System Specs: VM running Win XP SP2, ruby 1.8.7, IE 8