I can't ask the developers to make the change you suggested and opening the frames in seperate browsers doesn't work.
The test script I'm using is:
require 'watir'
require 'test/unit'
include Watir
class TC_Smoke_Test < Test::Unit::TestCase
def setup
#define constants
test_url = 'http://sedm3103.ent.agt.ab.ca:20003/desktopone/dashboard/initialAgent.do'
#launch browser
@ie = IE.new()
@ie.goto(test_url)
end
def teardown
#close browser
@ie.close()
end
def test_show_frames
puts @ie.show_frames()
end
end
The error message reads:
Loaded suite smoke_test
Started
there are 9 frames
frame index: 1 --Access Denied--
frame index: 2 --Access Denied--
frame index: 3 --Access Denied--
frame index: 4 --Access Denied--
frame index: 5 --Access Denied--
frame index: 6 --Access Denied--
frame index: 7 --Access Denied--
frame index: 8 --Access Denied--
frame index: 9 --Access Denied--
0..8
.
Finished in 9.531 seconds.
1 tests, 0 assertions, 0 failures, 0 errors
W, [16-Nov-2005 11:51:00#1360] WARN -- : frame error in waitdocument
OLE error code:80070005 in <Unknown>
Access is denied.
HRESULT error code:0x80020009
Exception occurred.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in `wait'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `upto'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `wait'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1254:in `goto'
smoke_test.rb:15:in `setup'
c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:69:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite'
c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator'
c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start'
c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run'
c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run'
c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run'
c:/ruby/lib/ruby/1.8/test/unit.rb:285
c:/ruby/lib/ruby/1.8/test/unit.rb:283
On 05/10/05, Bret Pettichord <[EMAIL PROTECTED]> wrote:
At 10:29 AM 10/1/2005, Peter wrote:
>I am using WATIR to test a web application and have hit some problems. I
>have reproduced the issue with an external website. My questions are:
>
>1. Can I safely ignore the frame error in waitdocument (it was been the
>topic of previous threads) [I get this error on both my internal website
>that I am testing as well as this external website].
Yes. An error message was removed from waitdocument in Watir 1.4.1. If you
still see an error message, then it is something else from what we discussed.
>2. How do I access frames (show_objects, click link etc) that return
>--Access Denied .
>
>v I am able to see the HTML on the screen (by right button view source)
>
>v ie.show_frames shows one of the frames as --Access Denied .
>
>v The second frame does not seem to appear in a show_all_objects
>
>v Attempting to access the second frame via index results in an error
>`method_missing': document (WIN32OLERuntimeError)
>
>v I have verified that the same commands work for Frame 1 (which does
>not report access denied)
One workaround is to get the URL for the access-denied frame (which you
should be able to get). And then open an IE browser that directly hosts
that URL. This workaround may or may not be acceptable depending on your
application.
The only other workaround is to have your developers set up the pages
hosted by separate subdomains to reference a common domain. This approach
wouldn't apply to the specific example in your script
( http://computer.howstuffworks.com/framed.htm?parent=web-page.htm&url="">),
but it is applicable to many of the common situations that run into the
access-denied problem. For more details, see
http://www.mozilla.org/projects/security/components/same-origin.html
Bret
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
