IE crashing after about 70 open/close event


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|

          $br_new = Watir::IE.attach(:url,linke.href)
          if not $br_new.pageContainsText(text) then
            puts "No match" #only debug feature
    else puts "Doesn't find list!"

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



Posted via