On 6/9/06, Lillis, Dara <[EMAIL PROTECTED]> wrote:

Sorry, been meaning to reply on this, I don't think this method exists in my version of watir (1.5.1.1017)

attempting to call the method results in "undefined method `persist_ole_connection' for #<Watir::IE:0x2a9a520> (NoMethodError)"

A search on the contents of all files in my "c:\ruby" directory returned no instances of "persist_ole_connection"

This is a class method, not an instance method. So you DON'T do:

  ie = IE.new
  ie.persist_ole_connection = true

But rather

  IE.persist_ole_connection = true

If you search for "def self.persist_ole_connection" you should find it in your version of watir.

I solved my problem by adding  "sleep 2" before calling IE.new. I don't open new IE windows so frequently during testing that this is a performance problem for me.

That works too. On my main development machine, it takes 90 seconds to start a new IE window after all of them have closed, whether i start it with Watir or manually. It's otherwise a fast machine. So i just make sure i never close that last IE window.

BTW, i've recently committed an enhanced version of the the close windows code that many of you are using.

  require 'watir/close_all'
  IE.close_all # note: this is a class method

Because i don't like to close all the windows, i also committed this:

  ie.close_others # note: this is an instance method

Dara, Thanks for the update.

Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to