Here's the code snippet that's giving me problems:
ie.table(:index,29).each do |row|
if (row[1].text =~ /#{journals}/) != nil then #If there is a match
for that regex
row[5].link(:index,1).click # this makes the popup window appear
cw = Watir::IE.attach(:title,'Popup Window') # attach to the popup
window
doRolesPopup(cw) # fill out and submit the form
end
end
doRolesPopup fills out a form in the cw page, then clicks submit. The
submit button submits the form, then closes the cw window and reloads
the ie window. This reload of the page referenced by the ie object
appears to break the row object, since I get the following error:
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `invoke': unknown
property or method `rows' (WIN32OLERuntimeError)
HRESULT error code:0x80070005
Access is denied. from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `row'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2404:in `each'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2404:in `upto'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2404:in `each'
from assignroles.rb:51
from c:/ruby/lib/ruby/1.8/csv.rb:532:in `parse'
from c:/ruby/lib/ruby/1.8/csv.rb:560:in `each'
from c:/ruby/lib/ruby/1.8/csv.rb:531:in `parse'
from assignroles.rb:35
Is there any way to keep this simple .each loop, or do I need to work
around it?
Thanks,
Ian
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general