IE crashing after about 70 open/close event

Hi,

I have to open links (about 3000) and then close them.
The problem is, that after 70 open/close event the IE (FF not supported
in our WebServer) crashes, stuck in memory and the script collapses.

The script:

def link_clicker()
    if $br.frame(...).exists? then
      $br.frame(...).lis.each do |linke|
          linke.click
          $br_new = Watir::IE.attach(:url,linke.href)
          if not $br_new.pageContainsText(text) then
            puts "No match" #only debug feature
          end
          $br_new.close
        end
    else puts "Doesn't find list!"
    end
  end

Any ideas how to solve the problem, please?
Thank you

SebeIs

···

--
Posted via http://www.ruby-forum.com/.