Hi JuanH,

Did you manage to solve this? I have this for only one of the sub-frames... 
yet I can access others in the window.

This works:

@browser.frame( :id => "ivuFrm_page0ivu1" ).frame( :id => 
"ivuFrm_page0ivu0" ).frames.each do|f|
puts "-- -- -- id: " + f.id
end

... but this produces the error:

@browser.frame( :id => "ivuFrm_page0ivu1" ).frame( :id => 
"ivuFrm_page0ivu0" ).frame( :id => "ls-blindlayer-0" ).frames.each do|f|
puts "-- -- -- id: " + f.id
end


This site is in my trusted sites, and I relaxed the security (All options 
under "Scripting" enabled) as you did.
I have WinXP + IE 8 and the following gems:

   - activesupport (3.2.8, 3.2.6)
   - addressable (2.3.2, 2.2.8)
   - bigdecimal (1.1.0)
   - builder (3.1.3, 3.0.0)
   - childprocess (0.3.5, 0.3.2)
   - columnize (0.3.6)
   - commonwatir (3.0.0)
   - cucumber (1.2.1)
   - daemons (1.1.9, 1.1.8)
   - diff-lcs (1.1.3)
   - execjs (1.4.0)
   - factory_girl (4.1.0, 3.4.0)
   - ffi (1.1.5 x86-mingw32, 1.0.11)
   - gherkin (2.11.2 x86-mingw32, 2.11.0 x86-mingw32)
   - hoe (3.1.0, 3.0.7)
   - i18n (0.6.1, 0.6.0)
   - io-console (0.3)
   - json (1.7.5, 1.5.4)
   - libv8 (3.11.8.0, 3.3.10.4)
   - libwebsocket (0.1.5, 0.1.3)
   - mini_magick (3.2.1)
   - minitest (3.5.0, 2.5.1)
   - multi_json (1.3.6)
   - nokogiri (1.5.5 x86-mingw32)
   - nwrfc (0.0.5)
   - ParseTree (3.0.9)
   - pdf-forms (0.4.4)
   - pickle (0.4.11, 0.4.10)
   - rake (0.9.2.2)
   - rautomation (0.7.2)
   - rbx-require-relative (0.0.9)
   - rdiscount (1.6.8)
   - rdoc (3.12, 3.9.4)
   - redis (3.0.1)
   - ref (1.0.0)
   - rspec (2.11.0, 2.10.0, 1.3.0)
   - rspec-core (2.11.1, 2.10.1)
   - rspec-expectations (2.11.3, 2.10.0)
   - rspec-mocks (2.11.3, 2.10.1)
   - rubygems-update (1.8.24)
   - RubyInline (3.11.3, 3.9.0)
   - rubyzip (0.9.9, 0.9.8)
   - s4t-utils (1.0.4)
   - selenium-webdriver (2.25.0, 2.22.2)
   - sexp_processor (4.0.1, 3.2.0)
   - subexec (0.0.4)
   - syntax (1.0.0)
   - sys-proctable (0.9.1 universal-mingw32)
   - systemu (2.5.2, 2.5.1)
   - testjour (0.3.2)
   - user-choices (1.1.6.1)
   - watir (3.0.0)
   - watir-classic (3.2.0, 3.0.0)
   - watir-webdriver (0.6.1)
   - win32-api (1.4.8 x86-mingw32)
   - win32-process (0.6.6)
   - win32screenshot (1.0.7)
   - windows-api (0.4.2)
   - windows-pr (1.2.2)
   - xml-simple (1.1.1)
   - yajl-ruby (1.1.0 x86-mingw32)
   - ZenTest (4.8.2, 4.8.1)


Rgds,
Derek

On Friday, September 14, 2012 11:07:59 PM UTC+2, JuanH wrote:
>
> Hi Everyone, 
>
> I am trying to build a watir script for a full testing of my web 
> application.
> I must use Internet Explorer 8.
> It run very well, but when im trying to getting a page with nested frames, 
> it fails like this:
>
> 1) Error when i try to get nested frame's elements by name's frame
> ...
> $browser = Watir::IE.new
> $browser.goto my_url
> $browser.frame(:name,'frame_parent').frame(:name,'frame_child').link(:text=>'My
>  
> link').click()
>
> *StackTrace:*
> NoMethodError: unknown property or method: `documentelement'
>     HRESULT error code:0x80020006
>       Nombre desconocido.
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/page-container.rb:31:in
>  
> `method_missing'
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/page-container.rb:31:in
>  
> `page'
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/page-container.rb:55:in
>  
> `html'
>         from (irb):77
>         from D:/ruby/Ruby193/bin/irb:12:in `<main>'
>
>
>
> 2) Error when i try to get nested frame's elements by index's frame
> ...
> $browser = Watir::IE.new
> $browser.goto my_url
> $browser.frame(:name,'frame_parent').frames[0].link(:text=>'My 
> link').click()
>
> *StackTrace:*
> Watir::Exception::FrameAccessDeniedException: IE will not allow access to 
> this frame for security reasons. You can work around this with 
> ie.goto(frame.src)
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/frame.rb:38:in
>  
> `document'
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/page-container.rb:31:in
>  
> `page'
>         from 
> D:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/page-container.rb:55:in
>  
> `html'
>         from (irb):78
>         from D:/ruby/Ruby193/bin/irb:12:in `<main>'
>
>
> I can not use suggestions like " ... You can work around this with 
> ie.goto(frame.src) ... ", because my frame_parent has 3 frame childs and 
> all this frames comunicate by javascript. Working very with first frame 
> level ('parent_frame'), but error when getting second frame level 
> ('frame_child').
> All frames are in the same domain, in the same aplication, but even it 
> fails.
> I have been minimized my web-browser security restrictions (Trusted Sites 
> Zone, enable frame scripts, activex privs,......an entire time bomb) but 
> doesn't wok.
>
>
> Any help will be appreciated.
> My current versions:
> *Watir:*
> watir (3.0.0)
> watir-classic (3.0.0)
> watir-webdriver (0.6.1)
> *Ruby:*
> ruby 1.9.3p194 (2012-04-20) [i386-mingw32]
>
> Thank you, 
> JuanH
>

-- 
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